fs.symlink()
Creates a symbolic link.
Signature
fs.symlink(target, link_path[, directory])
Parameters
Target text, link path and optional boolean directory, default false.
Returns
Null.
Behavior
Directory flag helps Windows select the link kind. The target may be relative to the link directory.
Errors
Unsupported operation, insufficient privilege or existing link path.
Example
use fs
use path
p = fs.temporary_directory()
write(path.join(p, 'data'), 'Atom')
fs.symlink('data', path.join(p, 'link'))
assert(read(path.join(p, 'link')) == 'Atom')
fs.remove(p, true)