Skip to content

Commit 240df52

Browse files
committed
Added name_starts_with parameter in Storage
1 parent 8d33a45 commit 240df52

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change log
22

3+
### 0.0.12
4+
- Added name_starts_with parameter in Storage
5+
6+
37
### 0.0.11
48
- Added Local Storage
59

freeze_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
build_date = date.today().strftime('%Y-%m-%d')
1313

14-
version = '0.0.11'
14+
version = '0.0.12'
1515

1616
with open(version_file_path, 'w+') as version_file:
1717
version_file.write("version = '{}'\n".format(version))

src/python_ms_core/core/storage/providers/azure/azure_storage_container.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ def __init__(self, name: str, container_client: ContainerClient):
1212
self.container_client = container_client
1313

1414
@ExceptionHandler.decorated
15-
def list_files(self):
16-
blob_iterator = self.container_client.list_blobs()
15+
def list_files(self, name_starts_with=None):
16+
if name_starts_with:
17+
blob_iterator = self.container_client.list_blobs(name_starts_with=name_starts_with)
18+
else:
19+
blob_iterator = self.container_client.list_blobs()
1720
files_list = []
1821
for single_item in blob_iterator:
1922
blob_client = self.container_client.get_blob_client(single_item.name)

0 commit comments

Comments
 (0)