11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

You can test for the existence of a file and check its operating system level access permissions.You can rename, copy, or delete a file. You can create or delete a directory, or copy the filesfrom one directory to another. You can return the datestamp for the creation or most recentmodification of a file or directory. You can return the current size of a file. You can returnthe currently available disk space and block size — information that may be vital when creatingor copying a file.Parametersflag$ZUTIL(140)A number specifying which file or directory operation to perform. The following table showsthe $ZUTIL(140) flags recognized by <strong>Caché</strong>:Flag12345OperationReturns file size in bytes. If an error occurs, $ZUTIL(140) returns the operatingsystem's error code as a negative number. Thus, negative values are platformdependent.Thefollowing are common error codes returned by Windows systems:–2 = file not found.–3 = pathname not found.–5 = access denied (usually named item is a directory, not a file.)–12 = invalid access (usually user does not have read permission.)Returns modification date/time in $HOROLOG format. Returns -2 if the specifiedfile or directory does not exist. Using the optional timeflag, you can specifywhether to return the modification time value in local timezone time or Universaltime (UTC). Universal time is (for most purposes) equivalent to Greenwich MeanTime (GMT).Returns creation date/time in $HOROLOG format. Returns -2 if the specified fileor directory does not exist. Using the optional timeflag, you can specify whetherto return the creation time value in local timezone time or Universal time (UTC).Universal time is (for most purposes) equivalent to Greenwich Mean Time (GMT).Tests whether the named item exists. Returns 0 if the specified pathname exists,for either a file or a directory. Returns -2 if the specified item does not exist.Deletes the named file. Can delete a read-only file if user has privileges to modifythe directory in which the file resides. Returns 0 when successful. Returns -2 ifname does not exist. Returns -5 if name is a directory.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 709

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!