在 Node.js 中,你可以使用 fs.realpathSync
函数来获取快捷方式所指向的路径。
例如:
const fs = require('fs');
const shortcutPath = '/path/to/shortcut.lnk';
const targetPath = fs.realpathSync(shortcutPath);
console.log(targetPath); // 输出快捷方式所指向的路径
在 Node.js 中,你可以使用 fs.realpathSync
函数来获取快捷方式所指向的路径。
例如:
const fs = require('fs');
const shortcutPath = '/path/to/shortcut.lnk';
const targetPath = fs.realpathSync(shortcutPath);
console.log(targetPath); // 输出快捷方式所指向的路径