Specifications

DescriptionAccess mode
Opens the file in write-only mode; if this flag is used with Append, the
file is not truncated; but if used on its own (or with Truncate), the file
is truncated
File.WriteOnly
Opens the file in read/write mode; the file is not truncatedFile.ReadWrite
Opens the file in append mode; you must actually use (WriteOnly |
Append) to make the file writable and to go into append mode; this
File.Append
mode is very useful when you want to write something to a log file:
the file index is set to the end of the file; note that the result is
undefined if you position the file index manually using at() in append
mode
Truncates the fileFile.Truncate
Enables line break translation (carriage return and linefeed) for text
files to platform-specific conventions
File.Translate
Static functions
Returns true if fileName exists; otherwise returns false.
exists( fileName : String ) :
Boolean
Deletes the file fileName if possible; otherwise throws an
exception.
remove( fileName : String )
Returns true if fileName is a file; otherwise returns false.
isFile( fileName : String ) :
Boolean
Returns true if fileName is a directory; otherwise returns
false.
isDir( fileName : String ) : Boolean
Returns true if the job matches the specified file type,
specified as a filename extension, and false otherwise.
isType( fileName : String, ext :
String ) : Boolean
A file matches if its filename extension and/or its Mac file
type (after conversion) match the specified filename
extension. A folder matches if any of the files at the topmost
level inside the folder match the specified type. These
semantics are similar to those of matching cross-platform
file types in filter connections.
Checking for arrival
This function checks if a file has "arrived":
If the file doesn't exist or can't be opened with exclusive read access, return false.
Note the file’s size, and wait for a specified period of time (“stability period”).
If the file’s size has changed during the period, return false.
If the file can't be opened with exclusive read access after the period, return false.
Otherwise return true.
413
Enfocus Switch 10