VMS Help  —  Lexicals  F$READLINK
    Returns the target file name which is indicated by the
    specified symbolic link, or NULL if the input is not a
    symbolic link.

    Format

      F$READLINK(filespec)

1  –  Return Value

    Either the text contents of a symbolic link or NULL if
    the input is not a symbolic link.

2  –  Arguments

 filespec

    Specifies the name of the symbolic link file. You must specify
    the file name as a character string expression.

3  –  Examples

  1.$ CREATE FILE.TXT
    HELLO EXIT
    $
    $ CREATE/SYMLINK="FILE.TXT" L.LNK
    $ X=F$READLINK("L.LNK")
    $ SH SYM X
      X = "FILE.TXT"
    $

    This example uses the F$READLINK function to return the
    target file name for a specified symbolic link.

  2.$ CREATE FILE.TXT
    HELLO EXIT
    $
    $ CREATE/SYMLINK="FILE.TXT" L.LNK
    $ CREATE/SYMLINK="L.LNK" LINK_TO_LINK.LNK
    $ X= F$READLINK("LINK_TO_LINK.LNK")
    $ SH SYM X
    X = "L.LNK"

    This example shows how F$READLINK functions when the target
    is a symbolic link file.
Close Help