upplib 3.1.7__py3-none-any.whl → 3.1.9__py3-none-any.whl
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.
- upplib/__init__.py +1 -0
- upplib/file.py +22 -1
- upplib/file_text.py +969 -0
- upplib/index.py +0 -963
- {upplib-3.1.7.dist-info → upplib-3.1.9.dist-info}/METADATA +1 -1
- {upplib-3.1.7.dist-info → upplib-3.1.9.dist-info}/RECORD +9 -8
- {upplib-3.1.7.dist-info → upplib-3.1.9.dist-info}/WHEEL +0 -0
- {upplib-3.1.7.dist-info → upplib-3.1.9.dist-info}/licenses/LICENSE +0 -0
- {upplib-3.1.7.dist-info → upplib-3.1.9.dist-info}/top_level.txt +0 -0
upplib/__init__.py
CHANGED
upplib/file.py
CHANGED
|
@@ -7,7 +7,7 @@ def get_file(file_path: str = None,
|
|
|
7
7
|
prefix: str = None,
|
|
8
8
|
path_contain: str = None,
|
|
9
9
|
contain: str = None,
|
|
10
|
-
sort_asc: bool | None =
|
|
10
|
+
sort_asc: bool | None = True,
|
|
11
11
|
path_suffix: str = None,
|
|
12
12
|
suffix: str = None) -> list[str]:
|
|
13
13
|
"""
|
|
@@ -49,6 +49,27 @@ def get_file_folder(file_name_one: str = None) -> str:
|
|
|
49
49
|
return all_file_path
|
|
50
50
|
|
|
51
51
|
|
|
52
|
+
def remove_folder_file(file_path: str = None,
|
|
53
|
+
path_prefix: str = None,
|
|
54
|
+
prefix: str = None,
|
|
55
|
+
path_contain: str = None,
|
|
56
|
+
contain: str = None,
|
|
57
|
+
path_suffix: str = None,
|
|
58
|
+
suffix: str = None):
|
|
59
|
+
"""
|
|
60
|
+
删除指定文件夹下面的指定的文件
|
|
61
|
+
"""
|
|
62
|
+
file_part_all_list = get_file(file_path=file_path,
|
|
63
|
+
path_prefix=path_prefix,
|
|
64
|
+
prefix=prefix,
|
|
65
|
+
path_contain=path_contain,
|
|
66
|
+
contain=contain,
|
|
67
|
+
path_suffix=path_suffix,
|
|
68
|
+
suffix=suffix)
|
|
69
|
+
for file_part_all_one in file_part_all_list:
|
|
70
|
+
os.remove(file_part_all_one)
|
|
71
|
+
|
|
72
|
+
|
|
52
73
|
def get_folder(file_path: str = None,
|
|
53
74
|
prefix: str = None,
|
|
54
75
|
contain: str = None,
|