Flfile.getmodificationdate() – Adobe Extending Flash Professional CS5 User Manual

Page 291

Advertising
background image

269

EXTENDING FLASH PROFESSIONAL

FLfile object

Last updated 5/2/2011

Parameters

fileOrFolderURI

A string, expressed as a file:/// URI, specifying the file or folder whose creation date and time you

want to retrieve as a JavaScript Date object.

Returns
A JavaScript Date object that represents the date and time when the specified file or folder was created. If the file
doesn’t exist, the object contains information indicating that the file or folder was created at midnight GMT on
December 31, 1969.

Description
Method; returns a JavaScript Date object that represents the date and time when the specified file or folder was created.

Example
The following example displays (in human-readable form) the date a file was created, in the Output panel:

// Make sure the specified file exists.

var file1Date = FLfile.getCreationDateObj("file:///c|/temp/file1.txt");

fl.trace(file1Date);

See also

FLfile.getCreationDate()

,

FLfile.getModificationDateObj()

FLfile.getModificationDate()

Availability
Flash MX 2004 7.2.

Usage

FLfile.getModificationDate(fileOrFolderURI)

Parameters

fileOrFolderURI

A string, expressed as a file:/// URI, specifying the file whose modification date and time you want

to retrieve as a hexadecimal string.

Returns
A string containing a hexadecimal number that represents the number of seconds that have elapsed between January
1, 1970 and the time the file or folder was last modified, or

"00000000"

if the file doesn’t exist.

Description
Method; specifies how many seconds have passed between January 1, 1970 and the time the file or folder was last
modified. This method is used primarily to compare the creation or modification dates of files or folders.

Example
The following example compares the modification dates of two files and determines which of the two was modified
more recently:

Advertising
This manual is related to the following products: