(static compiler) Extract rewrite_file_resources! method
(static compiler) add method documentation