Sample code for 30+ languages & platforms
Node.js

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 Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var fac = new chilkat.FileAccess();

    var targetPath = fac.SymlinkTarget("qa_data/my_symlink");
    if (fac.LastMethodSuccess !== true) {
        console.log("Failed to get symlink target.");
        return;
    }

    console.log("target path = " + targetPath);

}

chilkatExample();