bareos.util.path.Path
- class bareos.util.path.Path(path=None)[source]
 Bases:
objectClass to handle file paths.
- Parameters:
 path (str, optional) – string representation of the file system path.
Methods
getis_directoryis_rootlenremoveset_pathRemoves the first component of the path.
- shift()[source]
 Removes the first component of the path.
Example
>>> path = Path("/usr/bin/python") >>> path.shift() 'usr' >>> print(path) /bin/python
- Returns:
 First component of the path.
- Return type:
 - Raises:
 IndexError – if path can’t be shifted (path is empty).