SiteStorage.rename function

This commit is contained in:
HelloZeroNet 2016-04-06 13:50:20 +02:00
parent 8f39ed2467
commit 84e78859dc

View file

@ -167,6 +167,9 @@ class SiteStorage:
dir_path = self.getPath(inner_path) dir_path = self.getPath(inner_path)
os.rmdir(dir_path) os.rmdir(dir_path)
def rename(self, inner_path_before, inner_path_after):
os.rename(self.getPath(inner_path_before), self.getPath(inner_path_after))
# List files from a directory # List files from a directory
def list(self, dir_inner_path): def list(self, dir_inner_path):
directory = self.getPath(dir_inner_path) directory = self.getPath(dir_inner_path)