vfs.py 文件源码

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

项目:ceiba-dl 作者: lantw44 项目源码 文件源码
def open(self, path, cwd=None, edit_check=True, allow_students=True):
        if edit_check and hasattr(self, '_edit'):
            self._do_edit()
        if cwd == None:
            work = self.root
        else:
            work = cwd
        path = PurePosixPath(path)
        for item in path.parts:
            if item.find('/') >= 0:
                continue
            if not allow_students and work is self.root.students:
                return False
            work = work.access(item)
        if not work.ready:
            work.fetch()
        return work
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号