swirl Guide to OmniMark 6   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax     Other Library Functions  
function   vfsDescribeFile   Available in:
Professional
Enterprise

Library: omvfs - virtual file system
Include: omvfs.xin

Declaration

  define external function vfsDescribeFile
         value       vfsFile  file
   into  modifiable  stream   attributes
  where
file
is the vfsFile object to query.
attributes
is the returned shelf of description items.


Purpose

Use vfsDescribeFile to return a set of attributes describing a file.

Requirements

You must include the following line at the beginning of your OmniMark program:

  include "omvfs.xin"

file must be open (else external exception VFS200).

Usage Notes

The attributes shelf returned by this function contains the following keyed items.

  1. "name" (fully qualified file or directory name)
  2. "size" (file size in bytes)
  3. "atime"" (last accessed time in OmniMark date format)
  4. "mtime" (last modified time in OmniMark date format)
  5. "ctime" (last status change time in OmniMark date format)
If the virtual file system does not support a particular attribute item, it is returned as an empty string.

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.

Example

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"

    Related Syntax
   vfsDescribe
   vfsFileName
   vfsFileDir
   vfsFile
 
  Other Library Functions
   vfsChangeDir
   vfsChangeOwner
   vfsChangePermissions
   vfsClose
   vfsConnect
   vfsConnectDir
   vfsCopy
   vfsCursorPosition
   vfsDeleteDir
   vfsDeleteFile
   vfsDescribe
   vfsDescribeFile
   vfsDir
   vfsDirName
   vfsDisconnect
   vfsFile
   vfsFileDir
   vfsFileName
   vfsIsVersionCompatible
   vfsLibraryVersion
   vfsLink
   vfsList
   vfsLock
   vfsMakeDir
   vfsMove
   vfsMoveCursor
   vfsOpen
   vfsRead
   vfsTruncate
   vfsUnlock
   vfsWrite
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ ERRORS ]

OmniMark 6.5 Documentation Generated: December 23, 2002 at 6:25:47 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-2002.