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

vfsConnectDir

 
 

Library: File system utilities (OMVFS) legacy
Include: omvfs.xin
Return type: vfsDir
Returns: 

A vfsDir to the opened directory.


Declaration

  define external vfsDir function vfsConnectDir
         value  stream  absolute-URL

  or

  define external vfsDir function vfsConnectDir
         value  stream  relative-URL
     on  value  vfsDir  dir

Argument definitions

absolute-URL
is the location of the directory on the local file system you wish to connect to expressed as an absolute URL.
relative-URL
is the location of the directory on the local file system you wish to connect to. This parameter must be a relative URL using the file scheme and with the specified vfsDir object as its base.
dir
is a vfsDir object created by connecting a directory using either vfsConnect or vfsConnectDir.


Purpose

Use vfsConnectDir to create a connection to a directory location expressed using the file scheme for URLs on either

and to obtain a vfsDir for the connected directory. (See also vfsConnect.)

Requirements

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

  include "omvfs.xin"

The location supplied for absolute-URL must:

The location supplied for relative-URL must:

The vfsDir object dir must:

Usage Notes

Any connection made with this function can be reused by other vfs functions. This allows you to keep the number of connections to a minimum. Note: You must save the vfsDir component as a local or a global vfsDir variable to be able to reuse it this way.

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

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 the format of absolute URLs and valid encoding, see Internet Standard RFC 1738: Uniform Resource Locators.

For complete details on the format of relative URLs, see Internet Standard RFC 1808: Relative Uniform Resource Locators.

Example: Opening connections to directories on the local file system.

Open a connection to:

  1. a directory on the local file system,
  2. another directory relative to the already connected directory.

The vfsDir you are using must still be connected.

  include "omvfs.xin"

  process
    local vfsDir Toronto
    local vfsDir Montreal
  	. . .
    set Montreal to vfsConnect "file:///c:/Olympics/History_In_Canada/"
  	. . .
    set Toronto to vfsConnectDir "../Facilities/"
  	on Montreal

        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:03 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.