package
0.0.0-20250310224150-f24d5ce25984
Repository: https://github.com/buildbarn/bb-storage.git
Documentation: pkg.go.dev
# Functions
MustNewComponent is identical to NewComponent, except that it panics upon failure.
NewAbsoluteScopeWalker creates a ScopeWalker that only accepts absolute paths.
NewComponent creates a new pathname component.
NewLoopDetectingScopeWalker creates a decorator for ScopeWalker that prevents unlimited expansion of symbolic links by only allowing a finite number of iterations.
NewRelativeScopeWalker creates a ScopeWalker that only accepts relative paths.
NewVirtualRootScopeWalkerFactory creates a VirtualRootScopeWalkerFactory.
OnTerminalViaOnDirectory is an implementation of ComponentWalker's OnTerminal() that just calls into OnDirectory().
Resolve a pathname string, similar to how the namei() function would work in the kernel.
# Variables
EmptyBuilder is a Builder that contains path ".".
LocalFormat is capable of parsing pathname strings that are in the format that is supported by the current operating system, and stringifying parsed paths in that format as well.
RootBuilder is a Builder that contains path "/".
UNIXFormat is capable of parsing UNIX-style pathname strings, and stringifying parsed paths in that format as well.
VoidComponentWalker is an instance of ComponentWalker that can resolve any filename.
VoidScopeWalker is an instance of ScopeWalker that accepts both relative and absolute paths, and can resolve any filename.
WindowsFormat is capable of parsing Windows-style pathname strings, and stringifying parsed paths in that format as well.
# Structs
Builder for normalized pathname strings.
Component of a pathname.
GotDirectory is returned by ComponentWalker.OnDirectory(), in case the name corresponds to a directory stored in the current directory.
GotSymlink is returned by ComponentWalker.OnDirectory() and OnTerminal(), in case the name corresponds to a symbolic link stored in the current directory.
TerminalNameTrackingComponentWalker can be embedded into an implementation of ComponentWalker to provide a default implementation of the OnTerminal() method.
Trace of a path.
VirtualRootScopeWalkerFactory is a factory for decorators for ScopeWalker that place them at a path inside of a virtual file system hierarchy, potentially consisting of one or more symlinks pointing to it.
# Interfaces
ComponentWalker is an interface that is called into by Resolve().
Format of pathname strings.
GotDirectoryOrSymlink is a union type of GotDirectory and GotSymlink.
Parser is used by Resolve to parse paths in the resolution.
RelativeParser is used by Resolve to parse relative paths in the resolution.
ScopeWalker is an interface that is called into by Resolve().
Stringer is implemented by path types in this package that can be converted to string representations.
# Type aliases
ComponentsList is a sortable list of filenames in a directory.