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 CHANGED
@@ -8,6 +8,7 @@ from upplib.util import *
8
8
 
9
9
  # 有关文件操作类的包
10
10
  from upplib.file import *
11
+ from upplib.file_text import *
11
12
 
12
13
  # 有关 图表的 html 代码的包
13
14
  from upplib.chart_html import *
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 = 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,