aboutsummaryrefslogtreecommitdiff
path: root/tools/cru-py/cru/_path.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cru-py/cru/_path.py')
-rw-r--r--tools/cru-py/cru/_path.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/tools/cru-py/cru/_path.py b/tools/cru-py/cru/_path.py
deleted file mode 100644
index a131c41..0000000
--- a/tools/cru-py/cru/_path.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from pathlib import Path
-
-from ._error import CruException
-
-
-class CruPathError(CruException):
- def __init__(self, message, _path: Path, *args, **kwargs):
- super().__init__(message, *args, **kwargs)
- self._path = _path
-
- @property
- def path(self) -> Path:
- return self._path
-
-
-class CruPath(Path):
- def check_parents_dir(self, must_exist: bool = False) -> bool:
- for p in reversed(self.parents):
- if not p.exists() and not must_exist:
- return False
- if not p.is_dir():
- raise CruPathError("Parents path must be a dir.", self)
- return True