symlink – github.com/moby/sys/symlink Index | Files

package symlink

import "github.com/moby/sys/symlink"

Package symlink implements EvalSymlinksInScope which is an extension of filepath.EvalSymlinks, as well as a Windows long-path aware version of filepath.EvalSymlinks from the Go standard library (https://golang.org/pkg/path/filepath).

Index

Functions

func EvalSymlinks(path string) (string, error)

EvalSymlinks returns the path name after the evaluation of any symbolic links. If path is relative the result will be relative to the current directory, unless one of the components is an absolute symbolic link. This version has been updated to support long paths prepended with `\\?\`.

func FollowSymlinkInScope

func FollowSymlinkInScope(path, root string) (string, error)

FollowSymlinkInScope is a wrapper around evalSymlinksInScope that returns an absolute path. This function handles paths in a platform-agnostic manner.

Source Files

doc.go fs.go fs_unix.go

Version
v0.2.0
Published
Nov 5, 2021
Platform
linux/amd64
Imports
5 packages
Last checked
9 hours ago

Tools for package owners.