|
|||||
|
||||||
Other Library Functions |
function |
vfsConnect |
Library: File system utilities (OMVFS) legacy
Include: omvfs.xin |
Return type: vfsDir Returns: A vfsDir to the connected directory. |
define external vfsDir function vfsConnect value stream absolute-URL or define external vfsDir function vfsConnect value stream relative-URL on value vfsDir dir
Argument definitions
Use vfsConnect to create a connection to a directory location expressed using the file scheme for URLs on either
vfsConnectDir
.)
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:
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.
The local file system directory location is expressed as an URL, and not as a local file system path.
include "omvfs.xin" process local vfsDir Chicago . set Chicago to vfsConnect "file:///myPrograms/"
The local or global vfsDir you are reusing must still be connected.
include "omvfs.xin" process local vfsDir Toronto local vfsDir Montreal . . . set Montreal to vfsConnect "file:///Olympics/History_In_Canada/" . . . set Toronto to vfsConnect "../Facilities/" on Montreal