vcorelib.paths.base
index
/home/vkottler/src/vkottler/workspace/vcorelib/vcorelib/paths/base.py

A module implementing common pathing utilities.

 
Functions
       
get_file_ext(path: Union[pathlib.Path, str, NoneType], maxsplit: int = -1) -> str
From a path to a file, get the file's extension. Use 'maxsplit' to control
how many suffixes are considered part of the name or the extension.
get_file_name(path: Union[pathlib.Path, str, NoneType], maxsplit: int = -1) -> str
From a path to a file, get the name of the file. Use 'maxsplit' to control
how many suffixes are considered part of the name or the extension.
normalize(path: Union[pathlib.Path, str, NoneType], *parts: Union[str, pathlib.Path], require: bool = False) -> pathlib.Path
Normalize an input that could be a path into a path.
rel(path: Union[pathlib.Path, str, NoneType], base: Union[pathlib.Path, str, NoneType] = None) -> pathlib.Path
Attempt to make 'path' relative to base (which is the current-working
directory, if not provided).
set_exec_flags(path: Union[pathlib.Path, str, NoneType]) -> None
Set the executable bits, but respect the 'read' bits.
stats(path: Union[pathlib.Path, str, NoneType]) -> Optional[os.stat_result]
Get stats for a file on disk if it exists.

 
Data
        Pathlike = typing.Union[pathlib.Path, str, NoneType]