def scan_dir(self, path):
for entry in os.scandir(path):
if entry.name.startswith('.'):
continue
if entry.is_dir():
self.scan_dir(entry.path)
continue
name, ext = os.path.splitext(entry.name)
if ext.lower() in IMAGE_EXTS:
self.add_choice(path)
break
if ext.lower() in ARCHIVE_EXTS:
self.add_choice(entry.path)
评论列表
文章目录