Directory class
Class representing a Directory.
Constructors
Directory(Storage |
Create a Directory. |
Methods
Constructor Details
Directory(StorageClientContext)
Create a Directory.
new Directory(client: StorageClientContext)
Parameters
- client
- StorageClientContext
Reference to the service client.
Method Details
create(string, string, string, DirectoryCreateOptionalParams, ServiceCallback<void>)
function create(fileAttributes: string, fileCreationTime: string, fileLastWriteTime: string, options: DirectoryCreateOptionalParams, callback: ServiceCallback<void>)
Parameters
- fileAttributes
-
string
If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
- fileCreationTime
-
string
Creation time for the file/directory.
- fileLastWriteTime
-
string
Last write time for the file/directory.
- options
- DirectoryCreateOptionalParams
The optional parameters
- callback
-
ServiceCallback<void>
The callback
create(string, string, string, Models.DirectoryCreateOptionalParams)
Creates a new directory under the specified share or parent directory.
function create(fileAttributes: string, fileCreationTime: string, fileLastWriteTime: string, options?: Models.DirectoryCreateOptionalParams)
Parameters
- fileAttributes
-
string
If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
- fileCreationTime
-
string
Creation time for the file/directory.
- fileLastWriteTime
-
string
Last write time for the file/directory.
- options
- Models.DirectoryCreateOptionalParams
Returns
Promise<Models.DirectoryCreateResponse>
Promise<Models.DirectoryCreateResponse>
create(string, string, string, ServiceCallback<void>)
function create(fileAttributes: string, fileCreationTime: string, fileLastWriteTime: string, callback: ServiceCallback<void>)
Parameters
- fileAttributes
-
string
If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
- fileCreationTime
-
string
Creation time for the file/directory.
- fileLastWriteTime
-
string
Last write time for the file/directory.
- callback
-
ServiceCallback<void>
The callback
deleteMethod(DirectoryDeleteMethodOptionalParams, ServiceCallback<void>)
function deleteMethod(options: DirectoryDeleteMethodOptionalParams, callback: ServiceCallback<void>)
Parameters
The optional parameters
- callback
-
ServiceCallback<void>
The callback
deleteMethod(Models.DirectoryDeleteMethodOptionalParams)
Removes the specified empty directory. Note that the directory must be empty before it can be deleted.
function deleteMethod(options?: Models.DirectoryDeleteMethodOptionalParams)
Parameters
- options
- Models.DirectoryDeleteMethodOptionalParams
Returns
Promise<Models.DirectoryDeleteResponse>
Promise<Models.DirectoryDeleteResponse>
deleteMethod(ServiceCallback<void>)
function deleteMethod(callback: ServiceCallback<void>)
Parameters
- callback
-
ServiceCallback<void>
The callback
forceCloseHandles(string, DirectoryForceCloseHandlesOptionalParams, ServiceCallback<void>)
function forceCloseHandles(handleId: string, options: DirectoryForceCloseHandlesOptionalParams, callback: ServiceCallback<void>)
Parameters
- handleId
-
string
Specifies handle ID opened on the file or directory to be closed. Asterix (‘*’) is a wildcard that specifies all handles.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
forceCloseHandles(string, Models.DirectoryForceCloseHandlesOptionalParams)
Closes all handles open for given directory.
function forceCloseHandles(handleId: string, options?: Models.DirectoryForceCloseHandlesOptionalParams)
Parameters
- handleId
-
string
Specifies handle ID opened on the file or directory to be closed. Asterix (‘*’) is a wildcard that specifies all handles.
- options
- Models.DirectoryForceCloseHandlesOptionalParams
Returns
Promise<Models.DirectoryForceCloseHandlesResponse>
Promise<Models.DirectoryForceCloseHandlesResponse>
forceCloseHandles(string, ServiceCallback<void>)
function forceCloseHandles(handleId: string, callback: ServiceCallback<void>)
Parameters
- handleId
-
string
Specifies handle ID opened on the file or directory to be closed. Asterix (‘*’) is a wildcard that specifies all handles.
- callback
-
ServiceCallback<void>
The callback
getProperties(DirectoryGetPropertiesOptionalParams, ServiceCallback<void>)
function getProperties(options: DirectoryGetPropertiesOptionalParams, callback: ServiceCallback<void>)
Parameters
The optional parameters
- callback
-
ServiceCallback<void>
The callback
getProperties(Models.DirectoryGetPropertiesOptionalParams)
Returns all system properties for the specified directory, and can also be used to check the existence of a directory. The data returned does not include the files in the directory or any subdirectories.
function getProperties(options?: Models.DirectoryGetPropertiesOptionalParams)
Parameters
- options
- Models.DirectoryGetPropertiesOptionalParams
Returns
Promise<Models.DirectoryGetPropertiesResponse>
Promise<Models.DirectoryGetPropertiesResponse>
getProperties(ServiceCallback<void>)
function getProperties(callback: ServiceCallback<void>)
Parameters
- callback
-
ServiceCallback<void>
The callback
listFilesAndDirectoriesSegment(DirectoryListFilesAndDirectoriesSegmentOptionalParams, ServiceCallback<ListFilesAndDirectoriesSegmentResponse>)
function listFilesAndDirectoriesSegment(options: DirectoryListFilesAndDirectoriesSegmentOptionalParams, callback: ServiceCallback<ListFilesAndDirectoriesSegmentResponse>)
Parameters
The optional parameters
- callback
-
ServiceCallback<ListFilesAndDirectoriesSegmentResponse>
The callback
listFilesAndDirectoriesSegment(Models.DirectoryListFilesAndDirectoriesSegmentOptionalParams)
Returns a list of files or directories under the specified share or directory. It lists the contents only for a single level of the directory hierarchy.
function listFilesAndDirectoriesSegment(options?: Models.DirectoryListFilesAndDirectoriesSegmentOptionalParams)
Parameters
- options
- Models.DirectoryListFilesAndDirectoriesSegmentOptionalParams
Returns
Promise<Models.DirectoryListFilesAndDirectoriesSegmentResponse>
Promise<Models.DirectoryListFilesAndDirectoriesSegmentResponse>
listFilesAndDirectoriesSegment(ServiceCallback<ListFilesAndDirectoriesSegmentResponse>)
function listFilesAndDirectoriesSegment(callback: ServiceCallback<ListFilesAndDirectoriesSegmentResponse>)
Parameters
- callback
-
ServiceCallback<ListFilesAndDirectoriesSegmentResponse>
The callback
listHandles(DirectoryListHandlesOptionalParams, ServiceCallback<ListHandlesResponse>)
function listHandles(options: DirectoryListHandlesOptionalParams, callback: ServiceCallback<ListHandlesResponse>)
Parameters
The optional parameters
- callback
-
ServiceCallback<ListHandlesResponse>
The callback
listHandles(Models.DirectoryListHandlesOptionalParams)
Lists handles for directory.
function listHandles(options?: Models.DirectoryListHandlesOptionalParams)
Parameters
- options
- Models.DirectoryListHandlesOptionalParams
Returns
Promise<Models.DirectoryListHandlesResponse>
Promise<Models.DirectoryListHandlesResponse>
listHandles(ServiceCallback<ListHandlesResponse>)
function listHandles(callback: ServiceCallback<ListHandlesResponse>)
Parameters
- callback
-
ServiceCallback<ListHandlesResponse>
The callback
setMetadata(DirectorySetMetadataOptionalParams, ServiceCallback<void>)
function setMetadata(options: DirectorySetMetadataOptionalParams, callback: ServiceCallback<void>)
Parameters
The optional parameters
- callback
-
ServiceCallback<void>
The callback
setMetadata(Models.DirectorySetMetadataOptionalParams)
Updates user defined metadata for the specified directory.
function setMetadata(options?: Models.DirectorySetMetadataOptionalParams)
Parameters
- options
- Models.DirectorySetMetadataOptionalParams
Returns
Promise<Models.DirectorySetMetadataResponse>
Promise<Models.DirectorySetMetadataResponse>
setMetadata(ServiceCallback<void>)
function setMetadata(callback: ServiceCallback<void>)
Parameters
- callback
-
ServiceCallback<void>
The callback
setProperties(string, string, string, DirectorySetPropertiesOptionalParams, ServiceCallback<void>)
function setProperties(fileAttributes: string, fileCreationTime: string, fileLastWriteTime: string, options: DirectorySetPropertiesOptionalParams, callback: ServiceCallback<void>)
Parameters
- fileAttributes
-
string
If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
- fileCreationTime
-
string
Creation time for the file/directory.
- fileLastWriteTime
-
string
Last write time for the file/directory.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
setProperties(string, string, string, Models.DirectorySetPropertiesOptionalParams)
Sets properties on the directory.
function setProperties(fileAttributes: string, fileCreationTime: string, fileLastWriteTime: string, options?: Models.DirectorySetPropertiesOptionalParams)
Parameters
- fileAttributes
-
string
If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
- fileCreationTime
-
string
Creation time for the file/directory.
- fileLastWriteTime
-
string
Last write time for the file/directory.
- options
- Models.DirectorySetPropertiesOptionalParams
Returns
Promise<Models.DirectorySetPropertiesResponse>
Promise<Models.DirectorySetPropertiesResponse>
setProperties(string, string, string, ServiceCallback<void>)
function setProperties(fileAttributes: string, fileCreationTime: string, fileLastWriteTime: string, callback: ServiceCallback<void>)
Parameters
- fileAttributes
-
string
If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
- fileCreationTime
-
string
Creation time for the file/directory.
- fileLastWriteTime
-
string
Last write time for the file/directory.
- callback
-
ServiceCallback<void>
The callback
Azure SDK for JavaScript