Description
Method; returns a string representing the attributes of the specified file or folder, or an empty
string if the file has no specific attributes (that it, it is not read-only, not hidden, and so on).
You should always use
using this method.
Characters in the string represent the attributes as follows:
—
R
fileOrFolderURI
—
D
fileOrFolderURI
—
H
fileOrFolderURI
—
S
fileOrFolderURI
—
A
fileOrFolderURI
For example, if
fileOrFolderURI
Example
The following example gets the attributes of the file mydata.txt and displays an alert box if the
file is read-only.
var URI = "file:///c|/temp/mydata.txt";
if (FLfile.exists(URI)){
var attr = FLfile.getAttributes(URI);
if (attr && (attr.indexOf("R") != -1)) { // Returned string contains R.
alert(URI + " is read only!");
}
}
See also
FLfile.setAttributes()
FLfile.getCreationDate()
Availability
Flash MX 2004 7.2.
Usage
FLfile.getCreationDate(fileOrFolderURI)
Parameters
fileOrFolderURI
creation date and time you want to retrieve as a hexadecimal string.
260
Objects
FLfile.exists()
is read-only
is a folder (directory)
is hidden (Windows only)
is a system file or folder (Windows only)
is ready for archiving (Windows only)
is a hidden folder, the string returned is
A string, expressed as a file:/// URI, specifying the file or folder whose
to test for the existence of a file or folder before
.
"DH"
Need help?
Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?
Questions and answers