
CHAPTER 3: File System Access File object 51
File object functions
These functions are available for File objects.
relativeURI
String The path name for the referenced file in URI notation, relative to the
current folder. Read only.
type
String The file type as a four-character string.
X In Mac OS, the Mac OS file type.
X In Windows, "appl" for .EXE files, "shlb" for .DLL files and "TEXT"
for any other file.
If the file does not exist, the value is
"????". Read only.
changePath()
fileObj.changePath (path)
path
A string containing the new path, absolute or relative to the current folder.
Changes the path specification of the referenced file.
Returns true on success.
close()
fileObj.close ()
Closes this open file.
Returns true on success, false if there are I/O errors.
copy()
fileObj.copy (target)
target
A string with the URI path to the target location, or a File object that references the
target location.
Copies this object’s referenced file to the specified target location. Resolves any aliases to find the
source file. If a file exists at the target location, it is overwritten.
Returns true if the copy was successful, false otherwise.
createAlias()
fileObj.createAlias (path])
path
A string containing the path of the target file.
Makes this file a file-system alias or shortcut to the specified file. The referenced file for this object
must not yet exist on disk.
Returns true if the operation was successful, false otherwise.
Comentarios a estos manuales