C++
C++
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 C++ Downloads
#include <CkFileAccess.h>
void ChilkatSample(void)
{
CkFileAccess fac;
const char *targetPath = fac.symlinkTarget("qa_data/my_symlink");
if (fac.get_LastMethodSuccess() != true) {
std::cout << "Failed to get symlink target." << "\r\n";
return;
}
std::cout << "target path = " << targetPath << "\r\n";
}