How to use the azure-storage-file.azure.storage.file._download_chunking._download_file_chunks function in azure-storage-file

To help you get started, we’ve selected a few azure-storage-file examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-storage-python / azure-storage-file / azure / storage / file / fileservice.py View on Github external
stream.write(file.content)
            file.content = None

        # If the file is small, the download is complete at this point.
        # If file size is large, download the rest of the blob in chunks.
        if file.properties.content_length != download_size:
            # At this point we would like to lock on something like the etag so that
            # if the file is modified, we do not get a corrupted download. However,
            # this feature is not yet available on the file service.

            end_file = file_size
            if end_range is not None:
                # Use the end_range unless it is over the end of the file
                end_file = min(file_size, end_range + 1)

            _download_file_chunks(
                self,
                share_name,
                directory_name,
                file_name,
                download_size,
                self.MAX_CHUNK_GET_SIZE,
                first_get_size,
                initial_request_end + 1,  # start where the first download ended
                end_file,
                stream,
                max_connections,
                progress_callback,
                validate_content,
                timeout,
                operation_context,
                snapshot

azure-storage-file

Microsoft Azure Storage File Client Library for Python

MIT
Latest version published 5 years ago

Package Health Score

75 / 100
Full package analysis