Expand description
Provides general purpose file and path helpers.
Functionsยง
- get_
project_ name_ from_ path - Gets the last component (name of a project) of a path or returns a default value if the path has no valid last component.
- get_
relative_ or_ absolute_ path - Returns the relative path from
base
tofull
iffull
is insidebase
. Iffull
is outsidebase
, returns the absolute path instead. - prefix_
with_ current_ dir_ if_ needed - Transforms a path without prefix into a relative path starting at the current directory.
- replace_
in_ file - Replaces occurrences of specified strings in a file with new values.