def add_teacher(self, account, pwd=None):
s = self.vfs.strings
if account not in map(lambda x: x[0], self._children):
self.add(account, TeachersTeacherDirectory(self.vfs, self, account))
if pwd:
depth = 0
while pwd is not self.vfs.root:
pwd = pwd.parent
depth += 1
return PurePosixPath('../' * depth,
s['dir_root_teachers'], account).as_posix()
评论列表
文章目录