Creates an instance of ShareFileClient.
A URL string pointing to Azure Storage file, such as "https://myaccount.file.core.windows.net/myshare/mydirectory/file". You can append a SAS if using AnonymousCredential, such as "https://myaccount.file.core.windows.net/myshare/mydirectory/file?sasString". This method accepts an encoded URL or non-encoded URL pointing to a file. Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. However, if a file or directory name includes %, file or directory name must be encoded in the URL. Such as a file named "myfile%", the URL should be "https://myaccount.file.core.windows.net/myshare/mydirectory/myfile%25".
Creates an instance of ShareFileClient.
A URL string pointing to Azure Storage file, such as "https://myaccount.file.core.windows.net/myshare/mydirectory/file". You can append a SAS if using AnonymousCredential, such as "https://myaccount.file.core.windows.net/myshare/mydirectory/file?sasString". This method accepts an encoded URL or non-encoded URL pointing to a file. Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. However, if a file or directory name includes %, file or directory name must be encoded in the URL. Such as a file named "myfile%", the URL should be "https://myaccount.file.core.windows.net/myshare/mydirectory/myfile%25".
Call newPipeline() to create a default pipeline, or provide a customized pipeline.
StorageClient is a reference to protocol layer operations entry, which is generated by AutoRest generator.
URL string value.
Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata.
Id of the Copy File operation to abort.
Clears the specified range and releases the space used in storage for that range.
Creates a new file or replaces a file. Note it only initializes the file with no content.
Specifies the maximum size in bytes for the file, up to 1 TB.
Response data for the File Create operation.
Removes the file from the storage account. When a file is successfully deleted, it is immediately removed from the storage account's index and is no longer accessible to clients. The file's data is later removed from the service during garbage collection.
Delete File will fail with status code 409 (Conflict) and error code SharingViolation if the file is open on an SMB client.
Delete File is not supported on a share snapshot, which is a read-only copy of a share. An attempt to perform this operation on a share snapshot will fail with 400 (InvalidQueryParameterValue)
Response data for the File Delete operation.
Reads or downloads a file from the system, including its metadata and properties.
readableStreamBody
blobBody
Response data for the File Download operation.
ONLY AVAILABLE IN NODE.JS RUNTIME.
Downloads an Azure file in parallel to a buffer. Offset and count are optional, pass 0 for both to download the entire file.
Buffer to be fill, must have length larger than count
From which position of the Azure File to download
ONLY AVAILABLE IN NODE.JS RUNTIME.
Downloads an Azure Blob to a local file. Fails if the the given file path already exits. Offset and count are optional, pass 0 and undefined respectively to download the entire blob.
The response data for blob download operation, but with readableStreamBody set to undefined since its content is already read and written into a local file at the specified path.
Force close all handles for a file.
Force close a specific handle for a file.
Specific handle ID, cannot be asterisk "*". Use forceCloseAllHandles() to close all handles.
Returns all user-defined metadata, standard HTTP properties, and system properties for the file. It does not return the content of the file.
Response data for the File Get Properties operation.
Returns the list of valid ranges for a file.
Returns an async iterable iterator to list all the handles. under the specified account.
.byPage() returns an async iterable iterator to list the handles in pages.
An asyncIterableIterator that supports paging.
Resize file.
Resizes a file to the specified size in bytes. If the specified byte value is less than the current size of the file, then all ranges above the specified byte value are cleared.
Response data for the File Set HTTP Headers operation.
Sets HTTP headers on the file.
If no option provided, or no value provided for the file HTTP headers in the options, these file HTTP headers without a value will be cleared.
Response data for the File Set HTTP Headers operation.
Updates user-defined metadata for the specified file.
If no metadata defined in the option parameter, the file metadata will be removed.
Response data for the File Set Metadata operation.
Sets properties on the file.
Copies a blob or file to a destination file within the storage account.
Specifies the URL of the source file or blob, up to 2 KB in length. To copy a file to another file within the same storage account, you may use Shared Key to authenticate the source file. If you are copying a file from another storage account, or if you are copying a blob from the same storage account or another storage account, then you must authenticate the source file or blob using a shared access signature. If the source is a public blob, no authentication is required to perform the copy operation. A file in a share snapshot can also be specified as a copy source.
ONLY AVAILABLE IN BROWSERS.
Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to an Azure File.
Blob, File, ArrayBuffer or ArrayBufferView
ONLY AVAILABLE IN NODE.JS RUNTIME.
Uploads a local file to an Azure file.
Full path of local file
Upload a range of bytes to a file. Both the start and count of the range must be specified. The range can be up to 4 MB in size.
Blob, string, ArrayBuffer, ArrayBufferView or a function which returns a new Readable stream whose offset is from data source beginning.
Offset position of the destination Azure File to upload.
Length of body in bytes. Use Buffer.byteLength() to calculate body length for a string including non non-Base64/Hex-encoded characters.
Response data for the File Upload Range operation.
Upload a range of bytes to a file where the contents are read from a another file's URL. The range can be up to 4 MB in size.
Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication.
The source offset to copy from. Pass 0 to copy from the beginning of source file.
Offset of destination file.
Number of bytes to be uploaded from source file.
ONLY AVAILABLE IN NODE.JS RUNTIME.
Accepts a Node.js Readable stream factory, and uploads in blocks to an Azure File. The Readable stream factory must returns a Node.js Readable stream starting from the offset defined. The offset is the offset in the Azure file to be uploaded.
Returns a Node.js Readable stream starting from the offset defined
Size of the Azure file
ONLY AVAILABLE IN BROWSERS.
Uploads a browser Blob object to an Azure file. Requires a blobFactory as the data source, which need to return a Blob object with the offset and size provided.
ONLY AVAILABLE IN NODE.JS RUNTIME.
Uploads a Node.js Readable stream into an Azure file.
This method will try to create an Azure, then starts uploading chunk by chunk.
Size of chunk is defined by bufferSize
parameter.
Please make sure potential size of stream doesn't exceed file size.
PERFORMANCE IMPROVEMENT TIPS:
Node.js Readable stream. Must be less or equal than file size.
Size of file to be created. Maxium size allowed is 1TB. If this value is larger than stream size, there will be empty bytes in file tail.
Size of every buffer allocated in bytes, also the chunk/range size during the uploaded file. Size must be > 0 and <= 4 * 1024 * 1024 (4MB)
Max buffers will allocate during uploading, positive correlation with max uploading concurrency
Generated using TypeDoc
A ShareFileClient represents a URL to an Azure Storage file.
ShareFileClient