>>-v_link--vntoken--filename--vntoken2-------------------------><
Function
v_link invokes the v_link callable service to create a
link to the file specified by vntoken in the directory specified
by vntoken2. The link is a new name, filename, identifying
an existing file.
Parameters
- vntoken
- A variable name that contains the vnode token for the file being
linked to.
- filename
- The new name for the existing file.
- vntoken2
- A variable name that contains the vnode token for the directory
to which filename is to be added.
Usage notes
- v_link creates a link named filename to an existing
file specified by vntoken. This provides an alternative path
name for the existing file, so that you can access it by the old name
or the new name. You can store the link under the same directory as
the original file, or under a different directory on the same file
system.
- If the link is created successfully, the service routine increments
the link count of the file. The link count shows how many links to
a file exist. (If the link is not created successfully, the link count
is not incremented.)
- Links are not allowed to directories.
- If the link is created successfully, the change time of the linked-to
file is updated, as are the change and modification times of the directory
that contains filename—that is, the directory that
holds the link.
Example
In the following example, assume that
filetok,
name,
and
dirtok were assigned values earlier in the exec:
"v_link filetok (name) dirtok"