User Guide

FLfile object 257
Parameters
fileURI A string, expressed as a file:/// URI, that specifies the file you want to copy.
copyURI A string, expressed as a file:/// URI, that specifies the location and name of the
copied file.
Returns
A Boolean value of true if successful; false otherwise.
Description
Method; copies a file from one location to another. This method returns false if copyURI
already exists.
Example
The following example makes a backup copy of a configuration file named config.ini and
places it inside the same folder in which it is located, with a new name.
var originalFileURI="file:///C|/Program Files/MyApp/config.ini";
var newFileURI="file:///C|/Program Files/MyApp/config_backup.ini";
Flfile.copy(originalFileURI, newFileURI);
If you prefer, you can perform the same task with a single command:
Flfile.copy("file:///C|:/Program Files/MyApp/config.ini",
file:///C|/Program Files/MyApp/config_backup.ini");
FLfile.createFolder()
Availability
Flash MX 2004 7.2.
Usage
FLfile.createFolder( folderURI )
Parameters
folderURI A folder URI that specifies the folder structure you want to create.
Returns
A Boolean value of true if successful; false if folderURI already exists.