Java
Chilkat2 Java
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 Java Downloads
import com.chilkatsoft.chilkat2.ChilkatException;
import com.chilkatsoft.chilkat2.FileAccess;
public class ChilkatExample {
public static void main(String[] args) {
FileAccess fac = new FileAccess();
String targetPath;
try {
targetPath = fac.symlinkTarget("qa_data/my_symlink");
} catch (ChilkatException e) {
System.out.println("Failed to get symlink target.");
return;
}
System.out.println("target path = " + targetPath);
}
}