Sample code for 30+ languages & platforms
Lua Requires Chilkat v9.5.0.77+

Get the Target of a Symbolic Link

See more FileAccess Examples

Demonstrates how to get the target of a symbolic link.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

local fac = chilkat.FileAccess.new()

local targetPath = fac:symlink_target("qa_data/my_symlink")
if not fac.last_method_success then
    print("Failed to get symlink target.")
    return
end

print("target path = " .. targetPath)