swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

vfsDescribe

 
 

Library: File system utilities (OMVFS) legacy
Include: omvfs.xin

Declaration

  define external function vfsDescribe
         value       stream  path
    into modifiable  stream  attributes

  or

  define external function vfsDescribe
         value       stream  filename-URL
      on value       vfsDir  dir
    into modifiable  stream  attributes

Argument definitions

path
is the file to describe expressed in local file system format.
filename-URL
is the name of the file to describe expressed as a relative URL using the specified vfsDir object as its base.
dir
is a vfsDir object created using either vfsConnect or vfsConnectDir.
attributes
is the returned shelf of description items.


Purpose

Use vfsDescribe to obtain a description of a file or a directory.

Requirements

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

  include "omvfs.xin"

path must:

filename-URL must:

The vfsDir object dir must:

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)
  6. "isdir" (is this a directory or a file?)
  7. "permissions" (integer representation of file/dir permissions)
  8. "owner" (username of owner)
  9. "group" (group of file/dir)

If the drive containing the file or directory being described is a read-only drive (for example, a CD-ROM), the atime may be zero.

The attributes shelf is initially cleared of all contents.

If a particular attribute item is not supported by a virtual file system protocol , it is returned as an empty string.

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.

External exception VFS111 is thrown if an URL supplied as a parameter to this function contains invalid encoding.

External exception VFS004 is thrown if the URL exceeds system length limits.

For complete details on absolute URLs and valid encoding, see Internet Standards RFC 1738: Uniform Resource Locators.

For complete details on relative URLs, see Internet Standards RFC 1808: Relative Uniform Resource Locators.

Example

Obtaining the size of a file

  include "omvfs.xin"

  process
    local stream attrs variable
   	 .
    vfsDescribe "/programs/myscript.xom"
    	into attrs
    output attrs {"size"} || "%n"

        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
   vfsRename
   vfsTruncate
   vfsUnlock
   vfsWrite
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:46:04 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.