library.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:friction 作者: tinruufu 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号