Microsoft.Azure.Storage.File.CloudFile
Represents a file in the Microsoft Azure File service.
Gets the state of the most recent or pending copy operation.
The file permission to set on the next File Create or Set Properties call.
This field will be null after File.Create, File.SetProperties, File.GetProperties, and File.Get calls.
Gets the user-defined metadata for the file.
Gets the file's name.
Gets the CloudFileDirectory object representing the
parent directory for the file.
Gets the file's system properties.
Gets the CloudFileClient object that represents the File service.
Gets a CloudFileShare object representing the file's share.
Gets the file's URI for both the primary and secondary locations, including query string information if the file's share is a snapshot.
Gets the absolute URI to the file, including query string information if the file's share is a snapshot.
Gets the absolute URI to the file.
Gets or sets the minimum number of bytes to buffer when reading from a file stream.
Gets or sets the number of bytes to buffer when writing to a file stream.
Gets the file's URI.
Initializes a new instance of the CloudFile class using an absolute URI to the file.
Initializes a new instance of the CloudFile class using an absolute URI to the file.
Initializes a new instance of the CloudFile class using an absolute URI to the file.
public virtual void AbortCopy(string copyId, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Aborts an ongoing copy operation.
Initiates an asynchronous operation to abort an ongoing copy operation.
Initiates an asynchronous operation to abort an ongoing copy operation.
public virtual Task AbortCopyAsync(string copyId, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Initiates an asynchronous operation to abort an ongoing copy operation.
public virtual Task AbortCopyAsync(string copyId, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Initiates an asynchronous operation to abort an ongoing copy operation.
public virtual ICancellableAsyncResult BeginAbortCopy(string copyId, AsyncCallback callback, object state)
Begins an asynchronous operation to abort an ongoing copy operation.
public virtual ICancellableAsyncResult BeginAbortCopy(string copyId, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to abort an ongoing copy operation.
public virtual ICancellableAsyncResult BeginClearRange(long startOffset, long length, AsyncCallback callback, object state)
Begins an asynchronous operation to clear ranges from a file.
public virtual ICancellableAsyncResult BeginClearRange(long startOffset, long length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to clear ranges from a file.
public virtual ICancellableAsyncResult BeginCloseAllHandlesSegmented(FileContinuationToken token, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to close all SMB handles on this file.
public virtual ICancellableAsyncResult BeginCloseHandleSegmented(string handleId, FileContinuationToken token, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to close the specified SMB handle on this file.
Begins an asynchronous operation to create a file. If the file already exists, it will be overwritten.
public virtual ICancellableAsyncResult BeginCreate(long size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to create a file. If the file already exists, it will be overwritten.
Begins an asynchronous operation to delete the file.
public virtual ICancellableAsyncResult BeginDelete(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to delete the file.
Begins an asynchronous request to delete the file if it already exists.
public virtual ICancellableAsyncResult BeginDeleteIfExists(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous request to delete the file if it already exists.
public virtual ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? fileOffset, long? length, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file to a byte array.
public virtual ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? fileOffset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file to a byte array.
public virtual ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file to a stream.
public virtual ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file to a stream.
Begins an asynchronous operation to download the file's contents as a string.
public virtual ICancellableAsyncResult BeginDownloadText(Encoding encoding, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to download the file's contents as a string.
public virtual ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file to a byte array.
public virtual ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file to a byte array.
public virtual ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file in the File service to a local file.
public virtual ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file in the File service to a local file.
public virtual ICancellableAsyncResult BeginDownloadToStream(Stream target, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file to a stream.
public virtual ICancellableAsyncResult BeginDownloadToStream(Stream target, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to download the contents of a file to a stream.
Begins an asynchronous request to check existence of the file.
public virtual ICancellableAsyncResult BeginExists(FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous request to check existence of the file.
Begins an asynchronous operation to populate the file's properties and metadata.
public virtual ICancellableAsyncResult BeginFetchAttributes(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to populate the file's properties and metadata.
public virtual ICancellableAsyncResult BeginListHandlesSegmented(FileContinuationToken token, int? maxResults, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to get the SMB handles open on this file.
Begins an asynchronous operation to return a collection of valid ranges and their starting and ending bytes.
public virtual ICancellableAsyncResult BeginListRanges(long? offset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to return a collection of valid ranges and their starting and ending bytes.
Begins an asynchronous operation to open a stream for reading from the file.
public virtual ICancellableAsyncResult BeginOpenRead(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to open a stream for reading from the file.
public virtual ICancellableAsyncResult BeginOpenWrite(long? size, AsyncCallback callback, object state)
Begins an asynchronous operation to open a stream for writing to the file. If the file already exists, then existing data in the file may be overwritten.
public virtual ICancellableAsyncResult BeginOpenWrite(long? size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to open a stream for writing to the file. If the file already exists, then existing data in the file may be overwritten.
Begins an asynchronous operation to resize a file.
public virtual ICancellableAsyncResult BeginResize(long size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to resize a file.
Begins an asynchronous operation to update the file's metadata.
public virtual ICancellableAsyncResult BeginSetMetadata(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to update the file's metadata.
Begins an asynchronous operation to update the file's properties.
public virtual ICancellableAsyncResult BeginSetProperties(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to update the file's properties.
public virtual ICancellableAsyncResult BeginStartCopy(Uri source, AsyncCallback callback, object state)
Begins an asynchronous operation to start copying another Azure file or blob's contents, properties, and metadata to this Azure file.
public virtual ICancellableAsyncResult BeginStartCopy(CloudFile source, AsyncCallback callback, object state)
Begins an asynchronous operation to start copying another file's contents, properties, and metadata to this file.
public virtual ICancellableAsyncResult BeginStartCopy(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to start copying another Azure file or blob's contents, properties, and metadata to this Azure file.
public virtual ICancellableAsyncResult BeginStartCopy(CloudFile source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to start copying another file's contents, properties, and metadata to this file.
public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)
Begins an asynchronous operation to upload the contents of a byte array to a file. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to upload the contents of a byte array to a file. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadFromFile(string path, AsyncCallback callback, object state)
Begins an asynchronous operation to upload a file to the File service. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadFromFile(string path, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to upload a file to the File service. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, AsyncCallback callback, object state)
Begins an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AsyncCallback callback, object state)
Begins an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadText(string content, AsyncCallback callback, object state)
Begins an asynchronous operation to upload a string of text to a file. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginUploadText(string content, Encoding encoding, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to upload a string of text to a file. If the file already exists on the service, it will be overwritten.
public virtual ICancellableAsyncResult BeginWriteRange(Stream rangeData, long startOffset, string contentMD5, AsyncCallback callback, object state)
Begins an asynchronous operation to write a range to a file.
public virtual ICancellableAsyncResult BeginWriteRange(Stream rangeData, long startOffset, string contentMD5, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Begins an asynchronous operation to write a range to a file.
public virtual ICancellableAsyncResult BeginWriteRange(Stream rangeData, long startOffset, string contentMD5, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, AsyncCallback callback, object state)
public virtual void ClearRange(long startOffset, long length, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Clears ranges from a file.
Returns a task that performs an asynchronous operation to clear ranges from a file.
public virtual Task ClearRangeAsync(long startOffset, long length, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to clear ranges from a file.
public virtual Task ClearRangeAsync(long startOffset, long length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to clear ranges from a file.
public virtual Task ClearRangeAsync(long startOffset, long length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to clear ranges from a file.
public virtual CloseFileHandleResultSegment CloseAllHandlesSegmented(FileContinuationToken token = null, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Closes all SMB handles on this file.
public virtual Task<CloseFileHandleResultSegment> CloseAllHandlesSegmentedAsync(FileContinuationToken token = null, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)
Returns a task that performs an asynchronous operation to close all SMB handles on this file.
public virtual CloseFileHandleResultSegment CloseHandleSegmented(string handleId, FileContinuationToken token = null, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Closes the specified SMB handle on this file.
public virtual Task<CloseFileHandleResultSegment> CloseHandleSegmentedAsync(string handleId, FileContinuationToken token = null, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)
Returns a task that performs an asynchronous operation to close the specified SMB handle on this file.
public virtual void Create(long size, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Creates a file. If the file already exists, it will be overwritten.3584
Returns a task that performs an asynchronous operation to create a file. If the file already exists, it will be overwritten.
Returns a task that performs an asynchronous operation to create a file. If the file already exists, it will be overwritten.
public virtual Task CreateAsync(long size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to create a file. If the file already exists, it will be overwritten.
public virtual Task CreateAsync(long size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to create a file. If the file already exists, it will be overwritten.
public virtual void Delete(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Deletes the file.
Returns a task that performs an asynchronous operation to delete the file.
Returns a task that performs an asynchronous operation to delete the file.
public virtual Task DeleteAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to delete the file.
public virtual Task DeleteAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to delete the file.
public virtual bool DeleteIfExists(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Deletes the file if it already exists.
Returns a task that performs an asynchronous request to delete the file if it already exists.
Returns a task that performs an asynchronous request to delete the file if it already exists.
public virtual Task<bool> DeleteIfExistsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous request to delete the file if it already exists.
public virtual Task<bool> DeleteIfExistsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous request to delete the file if it already exists.
public virtual int DownloadRangeToByteArray(byte[] target, int index, long? fileOffset, long? length, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Downloads the contents of a file to a byte array.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? fileOffset, long? length)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? fileOffset, long? length, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? fileOffset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? fileOffset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? fileOffset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual void DownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Downloads the contents of a file to a stream.
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
public virtual string DownloadText(Encoding encoding = null, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Downloads the file's contents as a string.
Returns a task that performs an asynchronous operation to download the file's contents as a string.
Returns a task that performs an asynchronous operation to download the file's contents as a string.
public virtual Task<string> DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to download the file's contents as a string.
public virtual Task<string> DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the file's contents as a string.
public virtual Task<string> DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the file's contents as a string.
public virtual int DownloadToByteArray(byte[] target, int index, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Downloads the contents of a file to a byte array.
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual Task<int> DownloadToByteArrayAsync(byte[] target, int index, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a byte array.
public virtual void DownloadToFile(string path, FileMode mode, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Downloads the contents of a file in the File service to a local file.
Returns a task that performs an asynchronous operation to download the contents of a file in the File service to a local file.
public virtual Task DownloadToFileAsync(string path, FileMode mode, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file in the File service to a local file.
public virtual Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to download the contents of a file in the File service to a local file.
public virtual Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file in the File service to a local file.
public virtual Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file in the File service to a local file.
public virtual void DownloadToStream(Stream target, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Downloads the contents of a file to a stream.
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
public virtual Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
public virtual Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
public virtual Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
Ends an asynchronous operation to abort an ongoing copy operation.
Ends an asynchronous operation to clear ranges from a file.
Ends an asynchronous operation to close all SMB handles on this file.
Ends an asynchronous operation to close the specified SMB handle on this file.
Ends an asynchronous operation to create a file.
Ends an asynchronous operation to delete the file.
Returns the result of an asynchronous request to delete the file if it already exists.
Ends an asynchronous operation to download the contents of a file to a byte array.
Ends an asynchronous operation to download the contents of a file to a stream.
Ends an asynchronous operation to download the file's contents as a string.
Ends an asynchronous operation to download the contents of a file to a byte array.
Ends an asynchronous operation to download the contents of a file in the File service to a local file.
Ends an asynchronous operation to download the contents of a file to a stream.
Returns the asynchronous result of the request to check existence of the file.
Ends an asynchronous operation to populate the file's properties and metadata.
Ends an asynchronous operation to get the SMB handles open on this file.
Ends an asynchronous operation to return a collection of valid ranges and their starting and ending bytes.
Ends an asynchronous operation to open a stream for reading from the file.
Ends an asynchronous operation to open a stream for writing to the file.
Ends an asynchronous operation to resize a file.
Ends an asynchronous operation to update the file's metadata.
Ends an asynchronous operation to update the file's properties.
Ends an asynchronous operation to start copying another Azure file or blob's contents, properties, and metadata to this Azure file.
Ends an asynchronous operation to upload the contents of a byte array to a file.
Ends an asynchronous operation to upload a file to the File service.
Ends an asynchronous operation to upload a stream to a file.
Ends an asynchronous operation to upload a string of text to a file.
Ends an asynchronous operation to write a range to a file.
public virtual bool Exists(FileRequestOptions options = null, OperationContext operationContext = null)
Checks existence of the file.
Returns a task that performs an asynchronous request to check existence of the file.
Returns a task that performs an asynchronous request to check existence of the file.
public virtual Task<bool> ExistsAsync(FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous request to check existence of the file.
public virtual Task<bool> ExistsAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous request to check existence of the file.
public virtual void FetchAttributes(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Populates a file's properties and metadata.
Returns a task that performs an asynchronous operation to populate the file's properties and metadata.
Returns a task that performs an asynchronous operation to populate the file's properties and metadata.
public virtual Task FetchAttributesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to populate the file's properties and metadata.
public virtual Task FetchAttributesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to populate the file's properties and metadata.
Returns a shared access signature for the file.
Returns a shared access signature for the file.
public string GetSharedAccessSignature(SharedAccessFilePolicy policy, SharedAccessFileHeaders headers)
Returns a shared access signature for the file.
public string GetSharedAccessSignature(SharedAccessFilePolicy policy, SharedAccessFileHeaders headers, string groupPolicyIdentifier)
Returns a shared access signature for the file.
public string GetSharedAccessSignature(SharedAccessFilePolicy policy, SharedAccessFileHeaders headers, string groupPolicyIdentifier, SharedAccessProtocol? protocols, IPAddressOrRange ipAddressOrRange)
Returns a shared access signature for the file.
public virtual FileHandleResultSegment ListHandlesSegmented(FileContinuationToken token = null, int? maxResults = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Gets the SMB handles open on this file.
public virtual Task<FileHandleResultSegment> ListHandlesSegmentedAsync(FileContinuationToken token = null, int? maxResults = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)
Returns a task that performs an asynchronous operation to get the SMB handles open on this file.
public virtual IEnumerable<FileRange> ListRanges(long? offset = default, long? length = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Gets a collection of valid ranges and their starting and ending bytes.
Returns a task that performs an asynchronous operation to return a collection of valid ranges and their starting and ending bytes.
Returns a task that performs an asynchronous operation to return a collection of valid ranges and their starting and ending bytes.
public virtual Task<IEnumerable<FileRange>> ListRangesAsync(long? offset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to return a collection of valid ranges and their starting and ending bytes.
public virtual Task<IEnumerable<FileRange>> ListRangesAsync(long? offset, long? length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to return a collection of valid ranges and their starting and ending bytes.
public virtual Stream OpenRead(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Opens a stream for reading from the file.
Returns a task that performs an asynchronous operation to open a stream for reading from the file.
Returns a task that performs an asynchronous operation to open a stream for reading from the file.
public virtual Task<Stream> OpenReadAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to open a stream for reading from the file.
public virtual Task<Stream> OpenReadAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to open a stream for reading from the file.
public virtual CloudFileStream OpenWrite(long? size, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Opens a stream for writing to the file. If the file already exists, then existing data in the file may be overwritten.
Returns a task that performs an asynchronous operation to open a stream for writing to the file. If the file already exists, then existing data in the file may be overwritten.
public virtual Task<CloudFileStream> OpenWriteAsync(long? size, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to open a stream for writing to the file. If the file already exists, then existing data in the file may be overwritten.
public virtual Task<CloudFileStream> OpenWriteAsync(long? size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to open a stream for writing to the file. If the file already exists, then existing data in the file may be overwritten.
public virtual Task<CloudFileStream> OpenWriteAsync(long? size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to open a stream for writing to the file. If the file already exists, then existing data in the file may be overwritten.
public virtual void Resize(long size, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Resizes a file.
Returns a task that performs an asynchronous operation to resize a file.
Returns a task that performs an asynchronous operation to resize a file.
public virtual Task ResizeAsync(long size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to resize a file.
public virtual Task ResizeAsync(long size, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to resize a file.
public virtual void SetMetadata(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Updates the file's metadata.
Returns a task that performs an asynchronous operation to update the file's metadata.
Returns a task that performs an asynchronous operation to update the file's metadata.
public virtual Task SetMetadataAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to update the file's metadata.
public virtual Task SetMetadataAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to update the file's metadata.
public virtual void SetProperties(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Updates the file's properties.
Returns a task that performs an asynchronous operation to update the file's properties.
Returns a task that performs an asynchronous operation to update the file's properties.
public virtual Task SetPropertiesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to update the file's properties.
public virtual Task SetPropertiesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to update the file's properties.
public virtual string StartCopy(Uri source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Begins an operation to start copying another Azure file or blob's contents, properties, and metadata to this Azure file.
public virtual string StartCopy(CloudFile source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Begins an operation to start copying another file's contents, properties, and metadata to this file.
Initiates an asynchronous operation to start copying another Azure file or blob's contents, properties, and metadata to this Azure file.
Initiates an asynchronous operation to start copying another Azure file or blob's contents, properties, and metadata to this Azure file.
Initiates an asynchronous operation to start copying another file's contents, properties, and metadata to this file.
Initiates an asynchronous operation to start copying another file's contents, properties, and metadata to this file.
public virtual Task<string> StartCopyAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, FileRequestOptions options, OperationContext operationContext)
Initiates an asynchronous operation to start copying another Azure file or blob's contents, properties, and metadata to this Azure file.
public virtual Task<string> StartCopyAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Initiates an asynchronous operation to start copying another Azure file or blob's contents, properties, and metadata to this Azure file.
public virtual Task<string> StartCopyAsync(CloudFile source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, FileRequestOptions options, OperationContext operationContext)
Initiates an asynchronous operation to start copying another file's contents, properties, and metadata to this file.
public virtual Task<string> StartCopyAsync(CloudFile source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Initiates an asynchronous operation to start copying another file's contents, properties, and metadata to this file.
public virtual void UploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Uploads the contents of a byte array to a file. If the file already exists on the service, it will be overwritten.
Returns a task that performs an asynchronous operation to upload the contents of a byte array to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload the contents of a byte array to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to upload the contents of a byte array to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload the contents of a byte array to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload the contents of a byte array to a file. If the file already exists on the service, it will be overwritten.
public virtual void UploadFromFile(string path, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Uploads a file to the File service. If the file already exists on the service, it will be overwritten.
Returns a task that performs an asynchronous operation to upload a local file to the File service. If the file already exists on the service, it will be overwritten.
Returns a task that performs an asynchronous operation to upload a local file to the File service. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to upload a local file to the File service. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a local file to the File service. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a local file to the File service. If the file already exists on the service, it will be overwritten.
public virtual void UploadFromStream(Stream source, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Uploads a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual void UploadFromStream(Stream source, long length, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Uploads a stream to a file. If the file already exists on the service, it will be overwritten.
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a stream to a file. If the file already exists on the service, it will be overwritten.
public virtual void UploadText(string content, Encoding encoding = null, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Uploads a string of text to a file. If the file already exists on the service, it will be overwritten.
Returns a task that performs an asynchronous operation to upload a string of text to a file. If the file already exists on the service, it will be overwritten.
Returns a task that performs an asynchronous operation to upload a string of text to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to upload a string of text to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a string of text to a file. If the file already exists on the service, it will be overwritten.
public virtual Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to upload a string of text to a file. If the file already exists on the service, it will be overwritten.
public virtual void WriteRange(Stream rangeData, long startOffset, string contentMD5 = null, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Writes range to a file.
public virtual void WriteRange(Uri sourceUri, long sourceOffset, long count, long destOffset, Checksum sourceContentChecksum = null, AccessCondition sourceAccessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Writes range from a source file to this file.
Returns a task that performs an asynchronous operation to write a range to a file.
public virtual Task WriteRangeAsync(Stream rangeData, long startOffset, string contentMD5, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to write a range to a file.
public virtual Task WriteRangeAsync(Stream rangeData, long startOffset, string contentMD5, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Returns a task that performs an asynchronous operation to write a range to a file.
public virtual Task WriteRangeAsync(Stream rangeData, long startOffset, string contentMD5, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to write a range to a file.
public virtual Task WriteRangeAsync(Stream rangeData, long startOffset, string contentMD5, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Returns a task that performs an asynchronous operation to write a range to a file.
public virtual Task WriteRangeAsync(Uri sourceUri, long sourceOffset, long count, long destOffset, Checksum sourceContentChecksum = null, AccessCondition sourceAccessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)
Writes range from a source file to this file.