Sample code for 30+ languages & platforms
Visual FoxPro

Get the Target of a Symbolic Link

See more FileAccess Examples

Demonstrates how to get the target of a symbolic link.

Note: This example requires Chilkat v9.5.0.77 or greater.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL loFac
LOCAL lcTargetPath

loFac = CreateObject('Chilkat.FileAccess')

lcTargetPath = loFac.SymlinkTarget("qa_data/my_symlink")
IF (loFac.LastMethodSuccess <> 1) THEN
    ? "Failed to get symlink target."
    RELEASE loFac
    CANCEL
ENDIF

? "target path = " + lcTargetPath

RELEASE loFac