vfsLink

function

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

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:

location must:

The vfsDir object dir must:

link-path must not exist (external exception VFS307).

link-URL must not exist (external exception VFS307).

The vfsDir object link-dir must:

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"