I just noticed that Document.Filename is empty if file is loaded from FTP. It should be possible to get the name/path of a file. Even if it's located on FTP.
We also need some plugin functions for uploading/downloading from FTP.
Example case (The Node-Sass plugin Im currently working on)
The plugin is triggered by document save (if the file is a SASS stylesheet). Then it call node-sass and compile the file into other files, which is saved relative to the original document.
This works perfectly for local files. But for FTP files, I want to save a temp version of the document locally, compile it and then upload the generated files to the FTP server (With the path and credentials of the original document) This is currently not possible to to the lack of FTP functions.