☰

# std/symlinks

Theme:

- Manual
- Standard library
- Index
- Compiler docs
- Fusion docs
- devel, stable

Search:
Source Edit

This module implements symlink (symbolic link) handling.

# Imports

paths, ossymlinks

# Procs

    proc createSymlink(src, dest: Path) {.inline, ...raises: [OSError], tags: [],
                                          forbids: [].}

  Create a symbolic link at `dest` which points to the item specified by `src`. 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:

  - os: createHardlink proc
  - expandSymlink proc
  Source Edit

    proc expandSymlink(symlinkPath: Path): Path {.inline, ...raises: [OSError],
        tags: [], forbids: [].}

  Returns a string representing the path to which the symbolic link points.

  On Windows this is a noop, `symlinkPath` is simply returned.

  See also:

  - createSymlink proc
  Source Edit

    proc symlinkExists(link: Path): bool {.inline, ...tags: [ReadDirEffect],
                                           sideEffect, ...raises: [], forbids: [].}

  Returns true if the symlink `link` exists. Will return true regardless of whether the link points to a directory or file. Source Edit