pathpilot 0.4.6__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {pathpilot-0.4.6 → pathpilot-0.5.0}/PKG-INFO +2 -2
  2. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/__init__.py +7 -2
  3. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/decorators.py +14 -0
  4. {pathpilot-0.4.6 → pathpilot-0.5.0}/pyproject.toml +2 -2
  5. {pathpilot-0.4.6 → pathpilot-0.5.0}/uv.lock +1 -1
  6. {pathpilot-0.4.6 → pathpilot-0.5.0}/.gitignore +0 -0
  7. {pathpilot-0.4.6 → pathpilot-0.5.0}/.python-version +0 -0
  8. {pathpilot-0.4.6 → pathpilot-0.5.0}/LICENSE +0 -0
  9. {pathpilot-0.4.6 → pathpilot-0.5.0}/README.md +0 -0
  10. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/__init__.py +0 -0
  11. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/_utils.py +0 -0
  12. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/base/__init__.py +0 -0
  13. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/base/_decorators.py +0 -0
  14. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/base/core.py +0 -0
  15. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/base/df_dispatch_file.py +0 -0
  16. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/kinds/__init__.py +0 -0
  17. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/kinds/_csv.py +0 -0
  18. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/kinds/_excel.py +0 -0
  19. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/kinds/_parquet.py +0 -0
  20. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/kinds/_pickle.py +0 -0
  21. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/kinds/_sqlite.py +0 -0
  22. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/kinds/_text.py +0 -0
  23. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/kinds/_zip.py +0 -0
  24. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_file/utils.py +0 -0
  25. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/__init__.py +0 -0
  26. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/backup.py +0 -0
  27. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/folder/__init__.py +0 -0
  28. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/folder/_contents/__init__.py +0 -0
  29. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/folder/_contents/base.py +0 -0
  30. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/folder/_contents/files.py +0 -0
  31. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/folder/_contents/subfolders.py +0 -0
  32. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/folder/core.py +0 -0
  33. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_folder/utils.py +0 -0
  34. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/_utils.py +0 -0
  35. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/config.py +0 -0
  36. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/core.py +0 -0
  37. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/exceptions.py +0 -0
  38. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/path.py +0 -0
  39. {pathpilot-0.4.6 → pathpilot-0.5.0}/pathpilot/utils.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pathpilot
3
- Version: 0.4.6
4
- Summary: Library that facilitates file and folder manipulation in Python.
3
+ Version: 0.5.0
4
+ Summary: Simplifies file and folder manipulation
5
5
  Project-URL: repository, https://github.com/zteinck/pathpilot
6
6
  Project-URL: homepage, https://github.com/zteinck/pathpilot
7
7
  Author-email: Zachary Einck <zacharyeinck@gmail.com>
@@ -7,7 +7,12 @@ from .core import (
7
7
 
8
8
  from ._folder import *
9
9
  from ._file import *
10
- from .decorators import check_read_only
10
+
11
+ from .decorators import (
12
+ check_read_only,
13
+ assert_exists,
14
+ )
15
+
11
16
  from .exceptions import ReadOnlyError
12
17
 
13
18
  from .utils import (
@@ -21,5 +26,5 @@ from .utils import (
21
26
  get_modified_date,
22
27
  )
23
28
 
24
- __version__ = '0.4.6'
29
+ __version__ = '0.5.0'
25
30
  __author__ = 'Zachary Einck <zacharyeinck@gmail.com>'
@@ -21,4 +21,18 @@ def inject_read_only(func):
21
21
  params = {'read_only': self.read_only} | kwargs
22
22
  return func(self, *args, **params)
23
23
 
24
+ return wrapper
25
+
26
+
27
+ def assert_exists(func):
28
+
29
+ @wraps(func)
30
+ def wrapper(self, *args, **kwargs):
31
+ if not self.exists:
32
+ raise FileNotFoundError(
33
+ f"Cannot execute '{func.__name__}()' because the path does "
34
+ f"not exist:\n{self.path}"
35
+ )
36
+ return func(self, *args, **kwargs)
37
+
24
38
  return wrapper
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "pathpilot"
3
- version = "0.4.6"
4
- description = "Library that facilitates file and folder manipulation in Python."
3
+ version = "0.5.0"
4
+ description = "Simplifies file and folder manipulation"
5
5
  authors = [
6
6
  { name = "Zachary Einck", email = "zacharyeinck@gmail.com" }
7
7
  ]
@@ -202,7 +202,7 @@ wheels = [
202
202
 
203
203
  [[package]]
204
204
  name = "pathpilot"
205
- version = "0.4.6"
205
+ version = "0.5.0"
206
206
  source = { editable = "." }
207
207
  dependencies = [
208
208
  { name = "cachegrab" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes