def move(self, path: str):
"""
Move the file / directory to another location
:param path: New path to send to, accepts absolute and relative paths
:return: None
"""
if path.startswith("../"):
path = realpath(join(self.directory, path))
elif not path.startswith("/") or path.startswith("./"):
path = join(self.directory, path)
try:
self._webdav.move(self.path, path)
self.refresh()
except WebDavException as e:
raise StackException(e)
评论列表
文章目录