User Guide

264 Objects
Example
The following example displays (in human-readable form) the date a file was last modified in
the Output panel:
// Make sure the specified file exists.
var file1Date = FLfile.getModificationDateObj("file:///c|/temp/file1.txt");
trace(file1Date);
See also
FLfile.getCreationDateObj(), FLfile.getModificationDate()
FLfile.getSize()
Availability
Flash MX 2004 7.2.
Usage
FLfile.getSize( fileURI )
Parameters
fileURI A string, expressed as a file:/// URI, specifying the file whose size you want to
retrieve.
Returns
An integer that represents the size of the specified file, in bytes, or 0 if the file doesnt exist.
Description
Method; returns an integer that represents the size of the specified file, in bytes, or 0 if the file
doesnt exist. If the return value is 0, you can use
FLfile.exists() to determine whether the
file is a zero-byte file or if the file doesnt exist.
Example
The following example stores the size of the mydata.txt file in the fileSize variable:
var URL = "file:///c|/temp/mydata.txt";
var fileSize = FLfile.getSize(URL);