Package version:

A ShareClient represents a URL to the Azure Storage share allowing you to manipulate its directories and files.

Hierarchy

  • StorageClient
    • ShareClient

Constructors

Properties

accountName: string
storageClientContext: StorageClient

StorageClient is a reference to protocol layer operations entry, which is generated by AutoRest generator.

url: string

URL string value.

Accessors

Methods

  • Removes a file under the root directory of this share 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)

    Parameters

    Returns Promise<FileDeleteResponse>

    Promise File Delete response data.

  • Returns true if the Azrue share resource represented by this client exists; false otherwise.

    NOTE: use this function with care since an existing share might be deleted by other clients or applications. Vice versa new shares might be added by other clients or applications after this function completes.

    Parameters

    Returns Promise<boolean>

  • Creates a new ShareClient object identical to the source but with the specified snapshot timestamp. Provide "" will remove the snapshot and return a URL to the base share.

    Parameters

    • snapshot: string

      The snapshot timestamp.

    Returns ShareClient

    A new ShareClient object identical to the source but with the specified snapshot timestamp