fileutils-dir 0.3.0__tar.gz → 0.3.5__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.
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/PKG-INFO +1 -1
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/fileutils/files.py +4 -8
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/fileutils_dir.egg-info/PKG-INFO +1 -1
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/pyproject.toml +1 -1
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/README.md +0 -0
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/fileutils/__init__.py +0 -0
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/fileutils_dir.egg-info/SOURCES.txt +0 -0
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/fileutils_dir.egg-info/dependency_links.txt +0 -0
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/fileutils_dir.egg-info/top_level.txt +0 -0
- {fileutils_dir-0.3.0 → fileutils_dir-0.3.5}/setup.cfg +0 -0
|
@@ -22,10 +22,8 @@ def in_dir(
|
|
|
22
22
|
dtype=None,
|
|
23
23
|
) -> list[str]:
|
|
24
24
|
"""
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
in_dir(path, ext='filetype')
|
|
28
|
-
in_dir(path, dtype='data_type')
|
|
25
|
+
Positional Arguments are not accepted except path.
|
|
26
|
+
Please specify extention (ext="") or data type (dtype="")
|
|
29
27
|
dtype options: image, text, pdf, doc, sheet, presentation, code, data, audio, video, archive
|
|
30
28
|
"""
|
|
31
29
|
if args:
|
|
@@ -35,14 +33,12 @@ def in_dir(
|
|
|
35
33
|
" in_dir(path, ext='filetype')\n"
|
|
36
34
|
" in_dir(path, dtype='data_type')"
|
|
37
35
|
)
|
|
38
|
-
ext = ext or []
|
|
39
|
-
dtype = dtype or []
|
|
40
|
-
|
|
41
36
|
if isinstance(ext, str):
|
|
42
37
|
ext = [ext]
|
|
43
38
|
if isinstance(dtype, str):
|
|
44
39
|
dtype = [dtype]
|
|
45
|
-
|
|
40
|
+
ext = ext or []
|
|
41
|
+
dtype = dtype or []
|
|
46
42
|
normalized_extensions = {
|
|
47
43
|
e.lower() if e.startswith(".") else f".{e.lower()}"
|
|
48
44
|
for e in ext
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|