def delete(self):
if self.isfile():
self._conn.delete(self.url.path)
elif self.isdir():
try:
self._conn.rmd(self.url.path)
except ftplib.error_perm as err:
raise OSError(err)
else:
raise FileNotFoundError(str(self.url))
评论列表
文章目录