User Guide
Core objects 19
The following list contains the properties of the Errors object alphabetically:
EAppAlreadyRunning, EAppNotSerialized, EArrayIndexOutOfBounds,
EBadFileContents, EBadJsVersion, EBadNesting, EBadParam, EBadParamType,
EBadSelection, EBufferTooSmall, ECharConversionFailed, EDatabaseError,
EDeletingLastMasterChild, EDiskFull, EDuplicateFileName, EFileIsReadOnly,
EFileNotFound, EGenericErrorOccurred, EGroupDepth, EIllegalThreadAccess,
EInternalError, ELowOnMem, ENoActiveDocument, ENoActiveSelection,
ENoFilesSelected, ENoNestedMastersOrAliases, ENoNestedPasting,
ENoSliceableElems, ENoSuchElement, ENotImplemented, ENotMyType,
EOutOfMem, EResourceNotFound, ESharingViolation, EUnknownReaderFormat,
EUserCanceled, EUserInterrupted, EWrongType
Files object
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
copy(docname1, docname2) 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
true if
the copy is successful;
false otherwise.
createDirectory(dirname)
string Creates the specified directory. Returns
true if successful; false otherwise.
createFile(fileURL, fileType,
fileCreator)
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
fileType and fileCreator
strings should each be strings of exactly
four characters in length, for example:
Files.createFile(newFile,".txt","FWM
X");