Remove list directory from storage driver

This commit is contained in:
Jake Moshenko 2016-01-14 15:29:22 -05:00
parent 612098b645
commit 0b1951a4a4
5 changed files with 0 additions and 76 deletions

View file

@ -210,27 +210,6 @@ class _CloudStorage(BaseStorageV2):
mp.complete_upload()
return total_bytes_written, error
def list_directory(self, path=None):
self._initialize_cloud_conn()
path = self._init_path(path)
if not path.endswith('/'):
path += '/'
ln = 0
if self._root_path != '/':
ln = len(self._root_path)
exists = False
for key in self._cloud_bucket.list(prefix=path, delimiter='/'):
exists = True
name = key.name
if name.endswith('/'):
yield name[ln:-1]
else:
yield name[ln:]
if exists is False:
# In order to be compliant with the LocalStorage API. Even though
# S3 does not have a concept of folders.
raise OSError('No such directory: \'{0}\''.format(path))
def exists(self, path):
self._initialize_cloud_conn()
path = self._init_path(path)