I’ve been looking through a plugin that XAXA had released that allows you to temporarily store images from local files in Studio. Upon analysing its source code, I’ve found some examples of code that include method/class names I could neither find within the rest of the project, nor on the DevHub:
file:IsA("File")
file:GetBinaryContents()
file:GetTemporaryId()
As it turns out, I’ve discovered an entire class that isn’t documented at all: File. It yet managed to be implemented in a number of other plugins (i.e. Rōblox’s terrain height-map importer). It’s becoming apparent that the aforementioned plugins might mark the start a trend: where developers begin to utilise Studio’s cache more extensively. So, I believe something needs to be done to make it easier for other developers to access File. One way to significantly help is to make documentation public; File is only locked under PluginSecurity, whilst some CoreScript-exclusive members are listed publicly (i.e. RequestFriendship). Thank you for taking the time to read this.
It’s been 2 years and the File class documentation is still useless to me as a develop as I cannot use it’s functions due to missing documentations for GetBinaryContents() and GetTemporaryId() along with a few other missing documentations.
It isn’t really hard to understand what the File methods do using the short description and just simply testing them out.
File:GetBinaryContents() - Return the binary contents of a file. If it’s plaintext, return the text, If it’s an image, for example, return the image binary.
File:GetTemporaryId() - Return the temporary rbxId that can be used in ImageLabel.Image & ImageButton.Image. Is in the format of rbxtemp://<numberOfImportedImage> (first is rbxtemp://1, second is rbxtemp://2, etc.)