symlinks
nimony/lib/std/symlinks.nim
This module implements symlink (symbolic link) handling on Path.
See also:
- paths module for path handling
- os module for the
stringbased versions
proc symlinkExists(link: Path): boolReturns true if the symlink
linkexists. Will return true regardless of whether the link points to a directory or file.proc createSymlink(src: Path; dest: Path)Create a symbolic link at
destwhich points to the item specified bysrc. On most operating systems, will fail if a link already exists... warning:: Some OS's (such as Microsoft Windows) restrict the creation of symlinks to root users (administrators) or users with developer mode enabled.
See also:
createHardlink proc_expandSymlink proc_
proc createHardlink(src: Path; dest: Path)Create a hard link at
destwhich points to the item specified bysrc.See also:
createSymlink proc_
proc expandSymlink(symlinkPath: Path): PathReturns the stored target of the symbolic link
symlinkPath.This expands exactly one level of indirection, like POSIX
readlink. If the target is itself a symbolic link, it is returned as-is rather than being expanded further. Raises ifsymlinkPathis not a symbolic link or the target cannot be read.On Windows this reads symbolic links and junctions; other reparse points raise.
See also:
createSymlink proc_