It would be nice to have a comment here to mention that this is required to collapse/uncollapse all the files and not just the ones in the current page.