Documentation ¶
Overview ¶
Package upath contains utilities for dealing with symlinked paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsSymlink ¶
AbsSymlink returns an absolute path for the link from a file to a target.
func IsTargetSymlink ¶
IsTargetSymlink returns true if a target of a symlink is also a symlink.
func ResolveUntilLastSymlink ¶
ResolveUntilLastSymlink resolves until the last symlink.
This is needed when we have a chain of symlinks and want the last symlink, not the file pointed to (which is why we don't use filepath.EvalSymlinks)
I.e.
/foo/bar -> ../baz/foo /baz/foo -> bla
ResolveUntilLastSymlink(/foo/bar) returns /baz/foo.
func UrootPath ¶
UrootPath returns the absolute path for a uroot file with the UROOT_ROOT environment variable taken into account.
It returns a proper value if UROOT_ROOT is not set. u-root was built to assume everything is rooted at /, and in most cases that is still true. But in hosted mode, e.g. on developer mode chromebooks, it's far better if u-root can be rooted in /usr/local, so successive kernel/root file system upgrades do not wipe it out.
Types ¶
This section is empty.