swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
Functions       Platforms  
 

File system utilities (OMVFS) legacy

 
 

The omvfs library is a collection of OmniMark external functions for file and directory access and manipulation.

The omvfs library provides a unified interface for easy, efficient, and portable access to files and directories regardless of the location of the file or directory, or the protocol used to access the file.

The omvfs functions and OMX components

omvfs functions allow you to:

All paths in omvfs operations are system independent and use the "/" UNIX-style separator. Windows style paths are supported when running under Windows.

The functions in this library use the following OMX components:

Requirements

The omvfs external function library requires OmniMark 6.0 or later.

You must include the following line at the beginning of any OmniMark program using the omvfs library functions:

  include "omvfs.xin"

Usage Notes

General OS operation failure exceptions will return external exception VFS300. The accompanying text will contain details on the reason for the exception.

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

Here is a sample program that will list all files in /temp/ which have been modified more recently than 8 am October 31st EST, 2000.

  include "omvfs.xin"
  include "omdate.xin"

  process
     local stream listing variable
     local vfsDir list-dir

     set list-dir to vfsConnect "file:///temp/"

     vfsList on list-dir into listing include vfs-files

     repeat over listing
        local stream attrs variable
        vfsDescribe listing on list-dir into attrs
        output listing || '%n' when ymdhms-second-difference ( attrs{"mtime"},
           "20001131080000-0500" ) > 0
     again

omvfs Generated Exceptions

This is a complete list of VFS library generated exceptions. The exceptions are thrown back to the calling OmniMark program when a recoverable error is encountered.

  VFS000 	Memory could not be allocated
  VFS001 	The requested function is not supported for the type of connection
  VFS002 	The requested function is only available on UNIX platforms
  VFS003 	vfsDir objects cannot be created for local paths
  VFS004 	The specified path name exceeds system length limits
  VFS100 	The vfsDir object must be connected before it can be used	
  VFS101 	The connection location must be specified as an absolute or relative path
  VFS103 	An invalid host name was specified
  VFS104 	An invalid TCP/IP port number was specified
  VFS105 	The specified path is not a valid absolute or relative path
  VFS109 	An invalid value was specified for the content type include indicator
  VFS110 	The filename must not contain path information
  VFS111 	The specified URL contains invalid encoding
  VFS200 	The vfsFile object must be opened before it can be used
  VFS201 	An invalid value was specified for the file access
  VFS203 	The file name must be specified as a file with optional absolute or relative path information or as an URL
  VFS204 	The file must not have an active output or source associated with it
  VFS206 	The file must be opened with write access to enable writing to it
  VFS207 	The file must be opened with read access to enable reading from it
  VFS209 	An invalid value was specified for the absolute cursor movement
  VFS210 	Both absolute and relative cursor movement may not be specified
  VFS211 	The cursor cannot be positioned before the start of the file
  VFS212 	An invalid value was specified for the start of the locked region
  VFS213 	An invalid value was specified for the end of the locked region
  VFS214 	An invalid timeout value was specified
  VFS215 	The locked region must be at least one character long
  VFS216 	The specified lock region overlaps an existing lock region for the file
  VFS217 	The function timed out before the lock could be obtained
  VFS218 	An invalid lock ID was specified
  VFS300 	Generic operating system error exception
  VFS301 	The specified directory does not exist
  VFS302 	Unable to connect to the specified host and port
  VFS303 	Username and password was rejected by host
  VFS305 	The specified directory is not empty
  VFS306 	The specified file does not exist
  VFS307 	The specified file exists

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
 
Platforms
   HP/UX
   IBM AIX
   Linux (Intel)
   MS Windows 98/ME
   MS Windows NT/2000/XP
   Sun Solaris
 
 

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

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

Copyright © Stilo Corporation, 1988-2005.