Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShareClient

Package version

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

export
class

ShareClient

Hierarchy

Index

Constructors

constructor

Properties

accountName

accountName: string

Protected storageClientContext

storageClientContext: StorageClientContext

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

type

{StorageClientContext}

memberof

StorageClient

url

url: string

URL string value.

type

{string}

memberof

StorageClient

Accessors

rootDirectoryClient

shareName

  • get shareName(): string

Methods

create

createDirectory

createFile

  • createFile(fileName: string, size: number, options?: FileCreateOptions): Promise<object>

createPermission

createSnapshot

delete

deleteDirectory

deleteFile

  • 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)

    see

    https://docs.microsoft.com/en-us/rest/api/storageservices/delete-file2

    memberof

    ShareClient

    Parameters

    Returns Promise<FileDeleteResponse>

    Promise File Delete response data.

getAccessPolicy

getDirectoryClient

getPermission

getProperties

getStatistics

setAccessPolicy

setMetadata

setQuota

withSnapshot

  • 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.

    memberof

    ShareClient

    Parameters

    • snapshot: string

      The snapshot timestamp.

    Returns ShareClient

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

Generated using TypeDoc