__init__.py 文件源码

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

项目:ceiba-dl 作者: lantw44 项目源码 文件源码
def print_file(self, output, path, recursive):
        node = self.vfs.open(path)
        if self.vfs.is_internal_link(node):
            self.print_internal_link(output, path, node)
        elif self.vfs.is_regular(node):
            self.print_regular(output, path)
        elif self.vfs.is_directory(node):
            self.print_directory(output, path)
            for child_name, child_node in node.list():
                child_path = pathlib.PurePosixPath(path) / child_name
                child_path = child_path.as_posix()
                if not recursive and self.vfs.is_directory(child_node):
                    self.print_directory(output, child_path)
                else:
                    self.print_file(output, child_path, recursive)
        else:
            assert False, '?????????'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号