PowerBuilder
PowerBuilder
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 PowerBuilder Downloads
integer li_rc
oleobject loo_Fac
string ls_TargetPath
loo_Fac = create oleobject
li_rc = loo_Fac.ConnectToNewObject("Chilkat.FileAccess")
if li_rc < 0 then
destroy loo_Fac
MessageBox("Error","Connecting to COM object failed")
return
end if
ls_TargetPath = loo_Fac.SymlinkTarget("qa_data/my_symlink")
if loo_Fac.LastMethodSuccess <> 1 then
Write-Debug "Failed to get symlink target."
destroy loo_Fac
return
end if
Write-Debug "target path = " + ls_TargetPath
destroy loo_Fac