Sure using FileReference you can download an FTP file, I can't assure or deny that you can do it using the other formats.
Unless I am missing something, I dont think this feature is going to work...
How would I specify port 22 for FTP and enter username and password to download the source of my file?
For example... I have a php file that I want to download to my local computer.... it has the following data:
echo "Hello World!";
I want to be able to download the file with the source still in tact... and not already executed.
Can you send me a sample script if this feature does this? I have searched a little and cannot find anything like it.
When you set http in your FileReference you don't set port 80, because it's the default port, if you want to use another port you'll do this http://myhomepage.com:81; the same applies to FTP you set ftp://myserver/myfile.pdf.
Regarding credentials that's something else, in your web broser you can pass credentials directly in the address bar, probably the same will work with files.