# README
path
This enhances the standard path API with some extra functions. This API is intended to be a drop-in replacement; it merely calls through to the standard API where there is duplication.
There is also a type Path, which is a kind of string. Path provides a similar set of methods to the helper functions.
Please see the GoDoc for more.
Installation
go get -u github.com/rickb777/path
Status
This library has been in reliable production use for some time. Versioning follows the well-known semantic version pattern.
Licence
# Functions
Base returns the last element of path.
Clean returns the shortest path name equivalent to path by purely lexical processing.
Dir returns all but the last element of path, typically the path's directory.
Divide divides a path at the nth slash, not counting the leading slash if there is one.
Drop is a helper for Divide that returns the tail part only.
Ext returns the file name extension used by path.
IsAbs reports whether the path is absolute.
Join joins any number of path elements into a single path, adding a separating slash if necessary.
Match reports whether name matches the shell file name pattern.
Of joins any number of path elements to build a new path, adding a separating slashes as necessary.
OfAny joins any number of path elements to build a new path, adding a separating slashes as necessary.
Split splits path immediately following the final slash, separating it into a directory and file name component.
SplitExt splits the file name from its extension.
Take is a helper for Divide that returns the head part only.
# Variables
ErrBadPattern indicates a globbing pattern was malformed.
# Type aliases
Path is just a string with specialised methods.