Declaration define external function vfsLink
value stream path
to value stream link-path
or
define external function vfsLink
value stream path
to value stream link-URL
in value vfsDir link-dir
or
define external function vfsLink
value stream location
on value vfsDir dir
to value stream link-path
or
define external function vfsLink
value stream location
on value vfsDir dir
to value stream link-URL
in value vfsDir link-dir
Argument definitions
- path
- is the file or directory target of the link expressed in local file system format.
- location
- is the file or directory target of the link.
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 to a network resource using either vfsConnect or vfsConnectDir.
- link-path
- is the name of the symbolic link in local file system format.
- link-URL
- is the name of the symbolic link expressed as a relative URL using the File scheme and with the specified vfsDir object as its base.
- link-dir
- is a vfsDir object created by connecting to a network resource using either vfsConnect or vfsConnectDir.
Purpose
Use vfsLink to create a symbolic link for a file or subdirectory.
Requirements
You must include the following line at the beginning of your OmniMark program:
include "omvfs.xin"
path must:
- exist (else external exception VFS306)
- be a file or a directory
- be expressed in local file system format
- relative to the current directory on the local file system, or
- as an absolute path
location must:
- exist (external exception VFS306)
- be a file or a directory
- be expressed as a relative URL based on the current working directory for dir (else external exception VFS105)
The vfsDir object dir must:
- represent an existing connection made using vfsConnect or vfsConnectDir (else external exception VFS100)
- represent a connection made using the File scheme (else external exception VFS001)
link-path must not exist (external exception VFS307).
link-URL must not exist (external exception VFS307).
The vfsDir object link-dir must:
- represent an existing connection made using vfsConnect or vfsConnectDir (else external exception VFS100)
- represent a connection made using the File scheme (else external exception VFS001)
Usage Notes
This function can only be used for processes running in a Unix environment (else external exception VFS002).
General OS operation failure exceptions will return external exception VFS300. The accompanying text will contain details on the reason for the exception.
Example
Create a symbolic link ozfile.txt to a file expressed relative to the current directory.
include "omvfs.xin"
process
. . .
vfsLink "../myFiles/holland.txt"
to "ozfile.txt"
OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.
Copyright © Stilo International plc, 1988-2010.