Skip to content

Commit c4b7b61

Browse files
committed
Added support for directory operations
1 parent e355944 commit c4b7b61

12 files changed

+1540
-2
lines changed

azure-storage-blob/ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
> See [BreakingChanges](BreakingChanges.md) for a detailed list of API breaks.
44
5+
## Version XX.XX.XX
6+
7+
- Added support for directory operations: create, rename, and delete.
8+
59
## Version 2.1.0:
610

711
- Support for 2019-02-02 REST version. Please see our REST API documentation and blog for information about the related added features.
@@ -15,6 +19,7 @@
1519
- Updated dependency on azure-storage-common.
1620

1721
## Version 2.0.0:
22+
1823
- Support for 2018-11-09 REST version. Please see our REST API documentation and blog for information about the related added features.
1924
- Added support for append block from URL(synchronously) for append blobs.
2025
- Added support for update page from URL(synchronously) for page blobs.

azure-storage-blob/azure/storage/blob/_constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@
1212

1313
# internal configurations, should not be changed
1414
_LARGE_BLOB_UPLOAD_MAX_READ_BUFFER_SIZE = 4 * 1024 * 1024
15+
16+
_BLOB_SERVICE_PUBLIC_CLOUD_HOST = 'blob.core.windows.net'
17+
_DFS_SERVICE_PUBLIC_CLOUD_HOST = 'dfs.core.windows.net'

azure-storage-blob/azure/storage/blob/_deserialization.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,3 +648,8 @@ def _parse_sub_response_to_http_response(sub_response):
648648
body_stream.close()
649649

650650
return batch_http_sub_response
651+
652+
653+
def _parse_continuation_token(response):
654+
marker = response.headers.get('x-ms-continuation')
655+
return marker if marker is not '' else None

azure-storage-blob/azure/storage/blob/_serialization.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,12 @@ def _serialize_query(query):
302302
del serialized_query[-1]
303303

304304
return ''.join(serialized_query)
305+
306+
307+
# TODO to be removed after service update
308+
def _add_file_or_directory_properties_header(properties_dict, request):
309+
if properties_dict:
310+
if not request.headers:
311+
request.headers = {}
312+
request.headers['x-ms-properties'] = \
313+
",".join(["{}={}".format(str(name), _encode_base64(value)) for name, value in properties_dict.items()])

azure-storage-blob/azure/storage/blob/baseblobservice.py

Lines changed: 271 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)