function
Library: File system utilities (OMVFS legacy)
Include: omvfs.xin |
define external function vfsDescribeFile value vfsFile file into modifiable stream attributes
Argument definitions
Use vfsDescribeFile to return a set of attributes describing a file.
You must include the following line at the beginning of your OmniMark program:
include "omvfs.xin"
file must be open (else external exception VFS200).
The attributes shelf returned by this function contains the following keyed items.
If a particular attribute item is not supported by a virtual file system, it is returned as an empty string.
If the device on which the file is located is a read-only device (such as a CD-ROM), the atime value may be zero.
The attributes shelf is initially cleared of all contents.
External exception VFS300 is thrown for any general OS operation failure. The text accompanying the exception will contain details on the reason for the failure.
Obtaining the size of a file in a subdirectory of the current directory.
include "omvfs.xin" process local stream file-attrs variable local vfsFile myfile set myfile to vfsOpen "programs/myscript.xom" vfsDescribeFile myfile into file-attrs output file-attrs {"size"} || "%n"