| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System.IO; |
| | 5 | |
|
| | 6 | | namespace Azure.Storage.Files.DataLake.Models |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// The properties and content returned from downloading a file. |
| | 10 | | /// </summary> |
| | 11 | | public class FileDownloadInfo |
| | 12 | | { |
| | 13 | | /// <summary> |
| | 14 | | /// The number of bytes present in the response body. |
| | 15 | | /// </summary> |
| 88 | 16 | | public long ContentLength { get; internal set; } |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Content. |
| | 20 | | /// </summary> |
| 108 | 21 | | public Stream Content { get; internal set; } |
| | 22 | |
|
| | 23 | | /// <summary> |
| | 24 | | /// If the file has an MD5 hash and this operation is to read the full file, |
| | 25 | | /// this response header is returned so that the client can check for message content integrity. |
| | 26 | | /// </summary> |
| | 27 | | #pragma warning disable CA1819 // Properties should not return arrays |
| 84 | 28 | | public byte[] ContentHash { get; internal set; } |
| | 29 | | #pragma warning restore CA1819 // Properties should not return arrays |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Properties returned when downloading a file. |
| | 33 | | /// </summary> |
| 128 | 34 | | public FileDownloadDetails Properties { get; internal set; } |
| | 35 | |
|
| | 36 | | /// <summary> |
| | 37 | | /// Prevent direct instantiation of FileDownloadInfo instances. |
| | 38 | | /// You can use DataLakeModelFactory.FileDownloadInfo instead. |
| | 39 | | /// </summary> |
| 160 | 40 | | internal FileDownloadInfo() { } |
| | 41 | | } |
| | 42 | | } |