The File
class extends the FileReference
.
FileReference
is safe to be used in the FlashPlayer (in the browser) because it won't let you modify the files in the user machine.
If you want to open a file, you need to as for the user to open it for you with: FileReference.browse()
.
To save a file, you need to ask the user to save it: FileReference.save()
With File
class you can open, modify and save files without those dialogs.
Furthermore, the File
class gives you a bunch of useful properties like: File.desktopDirectory
, File.documentsDirectory
and such.
You can check if a file exists with the exists
property and have a much restriction when manipulating file in the user file system.
You can read more about the FileReference and File classes in the docs.