Tcl
Tcl
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 Tcl Downloads
load ./chilkat.dll
set fac [new_CkFileAccess]
set targetPath [CkFileAccess_symlinkTarget $fac "qa_data/my_symlink"]
if {[CkFileAccess_get_LastMethodSuccess $fac] != 1} then {
puts "Failed to get symlink target."
delete_CkFileAccess $fac
exit
}
puts "target path = $targetPath"
delete_CkFileAccess $fac