User Guide
Core objects 21
getLastErrorString()
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
null.
getTempFilePath ({dirname})
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
dirname is passed and is
not
null, the URL that is returned
indicates a file in the specified directory
rather than in the Temporary
Files directory.
isDirectory(dirname)
string The argument must be expressed as
file://URL. Returns
true if the specified
URL refers to a directory that exists;
false otherwise.
makePathFromDirAndFile(dirname,
plainFilename)
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,
Files.makePathFromDirAndFile("file:/
//work/reports", "logo.png")
returns
"file:///work/reports/logo.png".
open(docname, bWrite)
string, Boolean The first argument must be expressed
as file://URL. Opens the specified file
for reading or writing. If the second
argument is
true, the file opens for
writing; otherwise it opens for reading. If
the file cannot be opened, returns
null;
otherwise, returns a File Reference
object.
Method Data type Notes