PureBasic
PureBasic
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 PureBasic Downloads
IncludeFile "CkFileAccess.pb"
Procedure ChilkatExample()
fac.i = CkFileAccess::ckCreate()
If fac.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
targetPath.s = CkFileAccess::ckSymlinkTarget(fac,"qa_data/my_symlink")
If CkFileAccess::ckLastMethodSuccess(fac) <> 1
Debug "Failed to get symlink target."
CkFileAccess::ckDispose(fac)
ProcedureReturn
EndIf
Debug "target path = " + targetPath
CkFileAccess::ckDispose(fac)
ProcedureReturn
EndProcedure