package
0.0.0-20240311165601-da789b0b04e2
Repository: https://github.com/protoflow-labs/protoflow.git
Documentation: pkg.go.dev

# Functions

Base is equivalent to filepath.Base.
ByDir maps the paths into a map from directory via Dir to the original paths.
ChunkByDir splits paths into chunks of around the suggestedChunkSize while keeping directory affinity, i.e.
Components splits the path into it's components.
ContainsPath returns true if the dirPath contains the path.
Dir is equivalent to filepath.Dir.
EqualsOrContainsPath returns true if the value is equal to or contains the path.
Ext is equivalent to filepath.Ext.
Join is equivalent to filepath.Join.
MapAllEqualOrContainingPathMap returns the paths in m that are equal to, or contain path, in a new map.
MapAllEqualOrContainingPaths returns the matching paths in the map in a sorted slice.
MapHasEqualOrContainingPath returns true if the path matches any file or directory in the map.
NewError returns a new Error.
Normalize normalizes the given path.
NormalizeAndAbsolute normalizes the path and makes it absolute.
NormalizeAndTransformForPathType calls NormalizeAndValidate for relative paths, and NormalizeAndAbsolute for absolute paths.
NormalizeAndValidate normalizes and validates the given path.
Rel is equivalent to filepath.Rel.
StripComponents strips the specified number of components.
Unnormalize unnormalizes the given path.
ValidatePathComponent validates that the string is a valid component of a path, e.g.
ValidatePathComponents validates that all the strings are valid components of a path, e.g.
ValidatePathsNormalizedValidatedUnique validates the file or diretory paths are normalized and validated, and not duplicated.

# Constants

Absolute is the PathType for normalized and absolute paths.
Relative is the PathType for normalized and validated paths.

# Structs

Error is a path error.

# Type aliases

PathType is a terminate type for path comparisons.