Next: parser-tools unix-pathnames comp, Previous: parser-tools unix-pathnames parser, Up: parser-tools unix-pathnames [Index]
The following bindings are exported by the library (vicare
parser-tools unix-pathnames)
.
Given a list of bytevectors representing Unix pathname segments: normalise them, as much as possible, removing segments representing single–dot and double–dot directory entries; if absolute? is true: normalise segments as an absolute pathname, else normalise it as a relative pathname. Return two values:
#t
if some change was made from segments to the
second return value; this allows us to detect if a normalised list of
segments when serialised into a bytevector becomes different from the
original bytevector that generated segments.
Given a possibly empty list of bytevectors representing pathname segments build and return a new bytevector representing the full pathname; if absolute? is true: the first byte of the result represents a slash in ASCII coding.
If segments is null and absolute? is true: the returned value is a bytevector holding a single byte representing a slash in ASCII coding.
If segments is null and absolute? is false: the returned value is a bytevector holding a single byte representing a dot in ASCII coding.