fix local

This commit is contained in:
jxxghp
2024-07-26 22:04:50 +08:00
parent 4f4c7a5748
commit 40663b6ce7
5 changed files with 13 additions and 16 deletions

View File

@@ -241,7 +241,7 @@ class SystemUtils:
return dirs
@staticmethod
def list_sub_all(directory: Path) -> List[Path]:
def list_sub_file(directory: Path) -> List[Path]:
"""
列出当前目录下的所有子目录和文件(不递归)
"""
@@ -249,13 +249,14 @@ class SystemUtils:
return []
if directory.is_file():
return []
return [directory]
items = []
# 遍历目录
for path in directory.iterdir():
items.append(path)
if path.is_file():
items.append(path)
return items