FLfile object
259
Examples
The following example checks for a file called mydata.txt and displays an alert box indicating
whether the file exists.
var fileURI = "file:///c|/temp/mydata.txt";
if (FLfile.exists(fileURI)) {
alert( f " exists!");
}
else {
alert( f " does not exist.");
}
The following example checks to see if a required configuration file exists. If the file doesn’t
exist, it is created:
var configFile = "file:///C|/MyApplication/config.ini";
if (!FLfile.exists(configFile)) {
FLfile.write(configFile,"")
}
See also
FLfile.write()
FLfile.getAttributes()
Availability
Flash MX 2004 7.2.
Usage
FLfile.getAttributes(
fileOrFolderURI
)
Parameters
fileOrFolderURI
A string, expressed as a file:/// URI, specifying the file or folder whose
attributes you want to retrieve.
Returns
A string that represents the attributes of the specified file or folder.
NO
TE
Results are unpredictable if the file or folder doesn’t exist. You should use
FLfile.exists()
before using this method.
Summary of Contents for FLASH 8-EXTENDING FLASH
Page 1: ...Extending Flash...
Page 38: ...38 Top Level Functions and Methods...
Page 532: ...532 Objects...
Page 554: ...554 C Level Extensibility...