Is there a built-in way to preload the content of a file using the application object in the Dev Console?
Explanation
I need a way to get the content of a specific file while loading up the Glitch Editor. application.fileByPath(FILE_PATH).content() just gives me a blank string if the file hasn’t been opened yet.
I know that I could just force-open the file using some event shenanigans, but that would result in slightly slower loading times (for actually calling it).
I think application.fileByPath(FILE_PATH).content() is mostly to write to a file by providing parameter to the content(CONTENTS) function. Try using application.fileByPath(FILE_PATH).I.contents
Reloading the page seems to make it go back to an empty string again. Probably file contents are cached when opening a file and that’s what is accessed by application.fileByPath("path").I.content