The following table lists the methods of the Files object, along with their data types and, where appropriate, acceptable values and notes.
| Method | Data type | Notes |
|---|---|---|
|
|
string, string |
Copies the file specified in the first argument to the file specified in the second argument. Each argument must be the name of a file, which is expressed as file://URL. Only files (not directories) can be copied. The files do not need to reside on the same drive, and the method does not overwrite a file if it already exists. Returns a value of |
|
|
string |
Creates the specified directory. Returns |
|
|
string, string, string |
Creates the specified file. The file must not already exist. The first argument is the name of the file, which is expressed as file://URL. The last two arguments let you specify the file type and file creator strings. The
|
|
|
string |
Deletes the specified file or directory. Returns |
|
|
string |
Deletes the specified file or directory. Returns |
|
|
string |
Returns an array of file URLs. If |
|
|
string |
Returns |
|
|
string |
Returns only the directory name from |
|
|
string |
Returns the filename extension, if any, of |
|
|
string |
Returns just the filename from |
|
getLanguageDirectory() |
string |
Returns the URL of the language directory associated with the currently running language. |
|
|
none |
If the last call to a method in a Files object resulted in an error, returns a string that describes the error. If the last call succeeded, returns |
|
|
string |
The argument, if used, must be expressed as file://URL. Returns a file URL in the Temporary Files directory or in the specified directory. This method does not create a file; it simply returns a unique file URL that does not conflict with existing files in the directory. If |
|
|
string |
The argument must be expressed as file://URL. Returns |
|
|
string, string |
The first argument must be expressed as file://URL. Concatenates the two arguments to return a file URL that references the specified filename in the specified directory. For example, |
|
|
string, Boolean |
The first argument must be expressed as file://URL. Opens the specified file for reading or writing. If the second argument is |
|
|
string, string |
The The The |
|
|
string, string |
The first argument must be expressed as file://URL. Returns a file URL with |
|
|
string, string |
Each argument must be expressed as a file://URL. Swaps the contents of the two specified files, so that each file contains the contents of the other file. Only files (not directories) can be swapped, and both files must reside on the same drive. Returns |
The File Reference object is used to refer to a specific open file. The following table lists the methods of the File Reference object, along with their data types and, where appropriate, acceptable values and notes.
| Method | Data Type | Notes |
|---|---|---|
|
|
none |
Closes the current File Reference object. You are not required to use this method (the file is closed when the Files object is destroyed), but it is useful for controlling access to a file. |
|
|
none |
Reads the next line from the current File Reference object and returns it as a string. The end-of-line character(s) are not included in the string. Returns |
|
|
string |
Writes the specified string to the current File Reference object. No end-of-line characters are appended; to include one, use |
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fireworks/8/fwextending/fw_02_19.htm