Skip to content

Commit

Permalink
Added support for directory operations
Browse files Browse the repository at this point in the history
  • Loading branch information
zezha-msft committed Jun 4, 2019
1 parent 2b50f5c commit 03bfd33
Show file tree
Hide file tree
Showing 12 changed files with 1,539 additions and 1 deletion.
6 changes: 6 additions & 0 deletions azure-storage-blob/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

> See [BreakingChanges](BreakingChanges.md) for a detailed list of API breaks.
## Version XX.XX.XX

- Added support for directory operations: create, rename, and delete.

## Version 2.0.1:

- Updated dependency on azure-storage-common.

## Version 2.0.0:

- Support for 2018-11-09 REST version. Please see our REST API documentation and blog for information about the related added features.
- Added support for append block from URL(synchronously) for append blobs.
- Added support for update page from URL(synchronously) for page blobs.
Expand Down
3 changes: 3 additions & 0 deletions azure-storage-blob/azure/storage/blob/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@

# internal configurations, should not be changed
_LARGE_BLOB_UPLOAD_MAX_READ_BUFFER_SIZE = 4 * 1024 * 1024

_BLOB_SERVICE_PUBLIC_CLOUD_HOST = 'blob.core.windows.net'
_DFS_SERVICE_PUBLIC_CLOUD_HOST = 'dfs.core.windows.net'
5 changes: 5 additions & 0 deletions azure-storage-blob/azure/storage/blob/_deserialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,3 +554,8 @@ def _convert_xml_to_user_delegation_key(response):
delegation_key.value = key_element.findtext('Value')

return delegation_key


def _parse_continuation_token(response):
marker = response.headers.get('x-ms-continuation')
return marker if marker is not '' else None
9 changes: 9 additions & 0 deletions azure-storage-blob/azure/storage/blob/_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,12 @@ def _convert_delegation_key_info_to_xml(start_time, expiry_time):

# return xml value
return output


# TODO to be removed after service update
def _add_file_or_directory_properties_header(properties_dict, request):
if properties_dict:
if not request.headers:
request.headers = {}
request.headers['x-ms-properties'] = \
",".join(["{}={}".format(str(name), _encode_base64(value)) for name, value in properties_dict.items()])
270 changes: 269 additions & 1 deletion azure-storage-blob/azure/storage/blob/baseblobservice.py

Large diffs are not rendered by default.

Loading

0 comments on commit 03bfd33

Please sign in to comment.