Remove list directory from storage driver
This commit is contained in:
parent
612098b645
commit
0b1951a4a4
5 changed files with 0 additions and 76 deletions
|
@ -56,18 +56,6 @@ class LocalStorage(BaseStorageV2):
|
|||
with open(path, mode='wb') as out_fp:
|
||||
self.stream_write_to_fp(fp, out_fp)
|
||||
|
||||
def list_directory(self, path=None):
|
||||
path = self._init_path(path)
|
||||
prefix = path[len(self._root_path) + 1:] + '/'
|
||||
exists = False
|
||||
for d in os.listdir(path):
|
||||
exists = True
|
||||
yield prefix + d
|
||||
if exists is False:
|
||||
# Raises OSError even when the directory is empty
|
||||
# (to be consistent with S3)
|
||||
raise OSError('No such directory: \'{0}\''.format(path))
|
||||
|
||||
def exists(self, path):
|
||||
path = self._init_path(path)
|
||||
return os.path.exists(path)
|
||||
|
|
Reference in a new issue