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
评论列表
文章目录