This commit is contained in:
jxxghp
2023-08-27 08:18:31 +08:00
parent 4b91510695
commit 310dd7c229
2 changed files with 39 additions and 7 deletions

View File

@ -259,3 +259,15 @@ class SystemUtils:
if (dir_path / item).exists():
return True
return False
@staticmethod
def get_windows_drives():
"""
获取Windows所有盘符
"""
vols = []
for i in range(65, 91):
vol = chr(i) + ':'
if os.path.isdir(vol):
vols.append(vol)
return vols