Zig
Zig
Get the Target of a Windows Shortcut
See more FileAccess Examples
Demonstrates how to get the target of a Windows shortcut.Note: This example requires Chilkat v9.5.0.77 or greater.
Chilkat Zig Downloads
const std = @import("std");
const chilkat = @import("chilkat");
pub fn main(init: std.process.Init) !void {
const alloc = init.arena.allocator();
const fac = try chilkat.FileAccess.init();
defer fac.deinit();
const target_path = fac.symlinkTarget(alloc, "qa_data/my_shortcut") catch {
std.debug.print("Failed to get shortcut target.\n", .{});
return;
};
std.debug.print("target path = {s}\n", .{target_path});
}