MCPcopy Index your code
hub / github.com/jetify-com/devbox / Readlink

Method Readlink

internal/patchpkg/builder.go:407–415  ·  view source on GitHub ↗

Readlink returns the destination of a symlink.

(path string)

Source from the content-addressed store, hash-verified

405
406// Readlink returns the destination of a symlink.
407func (p *packageFS) Readlink(path string) (string, error) {
408 osPath, err := p.OSPath(path)
409 if err != nil {
410 return "", err
411 }
412 // TODO(gcurtis): check that the symlink isn't absolute or points
413 // outside the Nix store.
414 return os.Readlink(osPath)
415}
416
417// OSPath translates a package-relative path to an operating system path.
418func (p *packageFS) OSPath(path string) (string, error) {

Callers 3

GlobalDataPathFunction · 0.80
wipeProfileHistoryFunction · 0.80
copySymlinkMethod · 0.80

Calls 1

OSPathMethod · 0.95

Tested by

no test coverage detected