Share via


Directory class

Class representing a Directory.

Constructors

Directory(StorageClientContext)

Create a Directory.

Methods

create(DirectoryCreateOptionalParams, ServiceCallback<void>)
create(Models.DirectoryCreateOptionalParams)

Create a directory. By default, the destination is overwritten and if the destination already exists and has a lease the lease is broken. This operation supports conditional HTTP requests. For more information, see Specifying Conditional Headers for Blob Service Operations. To fail if the destination already exists, use a conditional request with If-None-Match: "*".

create(ServiceCallback<void>)
deleteMethod(boolean, DirectoryDeleteMethodOptionalParams, ServiceCallback<void>)
deleteMethod(boolean, Models.DirectoryDeleteMethodOptionalParams)

Deletes the directory

deleteMethod(boolean, ServiceCallback<void>)
getAccessControl(DirectoryGetAccessControlOptionalParams, ServiceCallback<void>)
getAccessControl(Models.DirectoryGetAccessControlOptionalParams)

Get the owner, group, permissions, or access control list for a directory.

getAccessControl(ServiceCallback<void>)
rename(string, DirectoryRenameOptionalParams, ServiceCallback<void>)
rename(string, Models.DirectoryRenameOptionalParams)

Rename a directory. By default, the destination is overwritten and if the destination already exists and has a lease the lease is broken. This operation supports conditional HTTP requests. For more information, see Specifying Conditional Headers for Blob Service Operations. To fail if the destination already exists, use a conditional request with If-None-Match: "*".

rename(string, ServiceCallback<void>)
setAccessControl(DirectorySetAccessControlOptionalParams, ServiceCallback<void>)
setAccessControl(Models.DirectorySetAccessControlOptionalParams)

Set the owner, group, permissions, or access control list for a directory.

setAccessControl(ServiceCallback<void>)

Constructor Details

Directory(StorageClientContext)

Create a Directory.

new Directory(client: StorageClientContext)

Parameters

client
StorageClientContext

Reference to the service client.

Method Details

create(DirectoryCreateOptionalParams, ServiceCallback<void>)

function create(options: DirectoryCreateOptionalParams, callback: ServiceCallback<void>)

Parameters

options
DirectoryCreateOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

create(Models.DirectoryCreateOptionalParams)

Create a directory. By default, the destination is overwritten and if the destination already exists and has a lease the lease is broken. This operation supports conditional HTTP requests. For more information, see Specifying Conditional Headers for Blob Service Operations. To fail if the destination already exists, use a conditional request with If-None-Match: "*".

function create(options?: Models.DirectoryCreateOptionalParams)

Parameters

options
Models.DirectoryCreateOptionalParams

Returns

Promise<Models.DirectoryCreateResponse>

Promise<Models.DirectoryCreateResponse>

create(ServiceCallback<void>)

function create(callback: ServiceCallback<void>)

Parameters

callback

ServiceCallback<void>

The callback

deleteMethod(boolean, DirectoryDeleteMethodOptionalParams, ServiceCallback<void>)

function deleteMethod(recursiveDirectoryDelete: boolean, options: DirectoryDeleteMethodOptionalParams, callback: ServiceCallback<void>)

Parameters

recursiveDirectoryDelete

boolean

If "true", all paths beneath the directory will be deleted. If "false" and the directory is non-empty, an error occurs.

options
DirectoryDeleteMethodOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

deleteMethod(boolean, Models.DirectoryDeleteMethodOptionalParams)

Deletes the directory

function deleteMethod(recursiveDirectoryDelete: boolean, options?: Models.DirectoryDeleteMethodOptionalParams)

Parameters

recursiveDirectoryDelete

boolean

If "true", all paths beneath the directory will be deleted. If "false" and the directory is non-empty, an error occurs.

options
Models.DirectoryDeleteMethodOptionalParams

Returns

Promise<Models.DirectoryDeleteResponse>

Promise<Models.DirectoryDeleteResponse>

deleteMethod(boolean, ServiceCallback<void>)

function deleteMethod(recursiveDirectoryDelete: boolean, callback: ServiceCallback<void>)

Parameters

recursiveDirectoryDelete

boolean

If "true", all paths beneath the directory will be deleted. If "false" and the directory is non-empty, an error occurs.

callback

ServiceCallback<void>

The callback

getAccessControl(DirectoryGetAccessControlOptionalParams, ServiceCallback<void>)

function getAccessControl(options: DirectoryGetAccessControlOptionalParams, callback: ServiceCallback<void>)

Parameters

options
DirectoryGetAccessControlOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

getAccessControl(Models.DirectoryGetAccessControlOptionalParams)

Get the owner, group, permissions, or access control list for a directory.

function getAccessControl(options?: Models.DirectoryGetAccessControlOptionalParams)

Parameters

options
Models.DirectoryGetAccessControlOptionalParams

Returns

Promise<Models.DirectoryGetAccessControlResponse>

Promise<Models.DirectoryGetAccessControlResponse>

getAccessControl(ServiceCallback<void>)

function getAccessControl(callback: ServiceCallback<void>)

Parameters

callback

ServiceCallback<void>

The callback

rename(string, DirectoryRenameOptionalParams, ServiceCallback<void>)

function rename(renameSource: string, options: DirectoryRenameOptionalParams, callback: ServiceCallback<void>)

Parameters

renameSource

string

The file or directory to be renamed. The value must have the following format: "/{filesysystem}/{path}". If "x-ms-properties" is specified, the properties will overwrite the existing properties; otherwise, the existing properties will be preserved.

options
DirectoryRenameOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

rename(string, Models.DirectoryRenameOptionalParams)

Rename a directory. By default, the destination is overwritten and if the destination already exists and has a lease the lease is broken. This operation supports conditional HTTP requests. For more information, see Specifying Conditional Headers for Blob Service Operations. To fail if the destination already exists, use a conditional request with If-None-Match: "*".

function rename(renameSource: string, options?: Models.DirectoryRenameOptionalParams)

Parameters

renameSource

string

The file or directory to be renamed. The value must have the following format: "/{filesysystem}/{path}". If "x-ms-properties" is specified, the properties will overwrite the existing properties; otherwise, the existing properties will be preserved.

options
Models.DirectoryRenameOptionalParams

Returns

Promise<Models.DirectoryRenameResponse>

Promise<Models.DirectoryRenameResponse>

rename(string, ServiceCallback<void>)

function rename(renameSource: string, callback: ServiceCallback<void>)

Parameters

renameSource

string

The file or directory to be renamed. The value must have the following format: "/{filesysystem}/{path}". If "x-ms-properties" is specified, the properties will overwrite the existing properties; otherwise, the existing properties will be preserved.

callback

ServiceCallback<void>

The callback

setAccessControl(DirectorySetAccessControlOptionalParams, ServiceCallback<void>)

function setAccessControl(options: DirectorySetAccessControlOptionalParams, callback: ServiceCallback<void>)

Parameters

options
DirectorySetAccessControlOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

setAccessControl(Models.DirectorySetAccessControlOptionalParams)

Set the owner, group, permissions, or access control list for a directory.

function setAccessControl(options?: Models.DirectorySetAccessControlOptionalParams)

Parameters

options
Models.DirectorySetAccessControlOptionalParams

Returns

Promise<Models.DirectorySetAccessControlResponse>

Promise<Models.DirectorySetAccessControlResponse>

setAccessControl(ServiceCallback<void>)

function setAccessControl(callback: ServiceCallback<void>)

Parameters

callback

ServiceCallback<void>

The callback