package metadb
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Metadb.Path
Source
A minimal library for manipulating typed representations of paths
A root path has the form "/some/.../path"
A relative path has the form "some/.../path"
A name is the name of a file or directory, which cannot contain the character '/'
Constructor for creating a root path, if debug
is set to true, mk_root
will check that input is well-formed. Raise InvalidRootType
otherwise
Constructor for creating a relative path, if debug
is set to true, mk_rel
will check that input is well-formed. Raise InvalidRelType
otherwise
Constructor for creating a name, if debug
is set to true, mk_name
will check that input is well-formed. Raise InvalidNameType
otherwise
merge root names
is the same as merge
but a relative path is given as a list of names
add_file_ext ext path
wiil add the file extension ext
to the leaf of path
, that is path'.'ext
remove_file_ext ext path
removes the file extension from the file name
strip_root root path
will drop the initial substring root
from path
, thus inversing merge
get_leaf "/some/.../path/leaf"
returns the leaf of a path, that is leaf
hidden path
will return true if the leaf of path
is a hidden file, that is starts with '.'
Pretty print path