@azure/storage-file-share 12.9.0-alpha.20220128.2 → 12.9.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -9
- package/dist/index.js +585 -45
- package/dist/index.js.map +1 -1
- package/dist-esm/src/Clients.js +125 -1
- package/dist-esm/src/Clients.js.map +1 -1
- package/dist-esm/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/mappers.js +232 -0
- package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +101 -35
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/directory.js +48 -0
- package/dist-esm/src/generated/src/operations/directory.js.map +1 -1
- package/dist-esm/src/generated/src/operations/file.js +51 -7
- package/dist-esm/src/generated/src/operations/file.js.map +1 -1
- package/dist-esm/src/generated/src/storageClientContext.js +1 -1
- package/dist-esm/src/generated/src/storageClientContext.js.map +1 -1
- package/dist-esm/src/generatedModels.js.map +1 -1
- package/dist-esm/src/utils/constants.js +1 -1
- package/dist-esm/src/utils/constants.js.map +1 -1
- package/dist-esm/src/utils/utils.common.js +22 -0
- package/dist-esm/src/utils/utils.common.js.map +1 -1
- package/package.json +6 -6
- package/types/3.1/storage-file-share.d.ts +225 -4
- package/types/latest/storage-file-share.d.ts +231 -4
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/storage-file-share",
|
3
3
|
"sdk-type": "client",
|
4
|
-
"version": "12.9.0-
|
4
|
+
"version": "12.9.0-beta.3",
|
5
5
|
"description": "Microsoft Azure Storage SDK for JavaScript - File",
|
6
6
|
"main": "./dist/index.js",
|
7
7
|
"module": "./dist-esm/src/index.js",
|
@@ -129,12 +129,12 @@
|
|
129
129
|
"tslib": "^2.2.0"
|
130
130
|
},
|
131
131
|
"devDependencies": {
|
132
|
-
"@azure/storage-blob": "^12.9.0-beta.
|
133
|
-
"@azure/dev-tool": "
|
134
|
-
"@azure/eslint-plugin-azure-sdk": "
|
135
|
-
"@azure/test-utils": "
|
132
|
+
"@azure/storage-blob": "^12.9.0-beta.3",
|
133
|
+
"@azure/dev-tool": "^1.0.0",
|
134
|
+
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
135
|
+
"@azure/test-utils": "^1.0.0",
|
136
136
|
"@azure-tools/test-recorder": "^1.0.0",
|
137
|
-
"@azure/test-utils-perf": "
|
137
|
+
"@azure/test-utils-perf": "^1.0.0",
|
138
138
|
"@microsoft/api-extractor": "^7.18.11",
|
139
139
|
"@types/chai": "^4.1.6",
|
140
140
|
"@types/mocha": "^7.0.2",
|
@@ -321,16 +321,16 @@ export declare interface CommonOptions {
|
|
321
321
|
}
|
322
322
|
/** Parameter group */
|
323
323
|
export declare interface CopyFileSmbInfo {
|
324
|
-
/** Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. */
|
325
|
-
filePermissionCopyMode?: PermissionCopyModeType;
|
326
|
-
/** Specifies the option to overwrite the target file if it already exists and has read-only attribute set. */
|
327
|
-
ignoreReadOnly?: boolean;
|
328
324
|
/** Specifies either the option to copy file attributes from a source file(source) to a target file or a list of attributes to set on a target file. */
|
329
325
|
fileAttributes?: string;
|
330
326
|
/** Specifies either the option to copy file creation time from a source file(source) to a target file or a time value in ISO 8601 format to set as creation time on a target file. */
|
331
327
|
fileCreationTime?: string;
|
332
328
|
/** Specifies either the option to copy file last write time from a source file(source) to a target file or a time value in ISO 8601 format to set as last write time on a target file. */
|
333
329
|
fileLastWriteTime?: string;
|
330
|
+
/** Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. */
|
331
|
+
filePermissionCopyMode?: PermissionCopyModeType;
|
332
|
+
/** Specifies the option to overwrite the target file if it already exists and has read-only attribute set. */
|
333
|
+
ignoreReadOnly?: boolean;
|
334
334
|
/** Specifies the option to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state. */
|
335
335
|
setArchiveAttribute?: boolean;
|
336
336
|
}
|
@@ -767,6 +767,96 @@ export declare interface DirectoryProperties extends FileAndDirectorySetProperti
|
|
767
767
|
*/
|
768
768
|
abortSignal?: AbortSignalLike;
|
769
769
|
}
|
770
|
+
/** Defines headers for Directory_rename operation. */
|
771
|
+
export declare interface DirectoryRenameHeaders {
|
772
|
+
/** The ETag contains a value which represents the version of the file, in quotes. */
|
773
|
+
etag?: string;
|
774
|
+
/** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */
|
775
|
+
lastModified?: Date;
|
776
|
+
/** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
|
777
|
+
requestId?: string;
|
778
|
+
/** Indicates the version of the File service used to execute the request. */
|
779
|
+
version?: string;
|
780
|
+
/** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */
|
781
|
+
date?: Date;
|
782
|
+
/** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
|
783
|
+
isServerEncrypted?: boolean;
|
784
|
+
/** Key of the permission set for the file. */
|
785
|
+
filePermissionKey?: string;
|
786
|
+
/** Attributes set for the file. */
|
787
|
+
fileAttributes?: string;
|
788
|
+
/** Creation time for the file. */
|
789
|
+
fileCreationTime?: Date;
|
790
|
+
/** Last write time for the file. */
|
791
|
+
fileLastWriteTime?: Date;
|
792
|
+
/** Change time for the file. */
|
793
|
+
fileChangeTime?: Date;
|
794
|
+
/** The fileId of the file. */
|
795
|
+
fileId?: string;
|
796
|
+
/** The parent fileId of the directory. */
|
797
|
+
fileParentId?: string;
|
798
|
+
}
|
799
|
+
/**
|
800
|
+
* Options to configure the {@link ShareDirectoryClient.rename} operation.
|
801
|
+
*/
|
802
|
+
export declare interface DirectoryRenameOptions extends CommonOptions {
|
803
|
+
/**
|
804
|
+
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
805
|
+
* For example, use the @azure/abort-controller to create an `AbortSignal`.
|
806
|
+
*/
|
807
|
+
abortSignal?: AbortSignalLike;
|
808
|
+
/**
|
809
|
+
* Lease access condition for source file. Required if the source file has an active infinite lease.
|
810
|
+
*/
|
811
|
+
sourceLeaseAccessConditions?: LeaseAccessConditions;
|
812
|
+
/**
|
813
|
+
* Lease access condition for destination file. Required if the destination file has an active infinite lease.
|
814
|
+
*/
|
815
|
+
destinationLeaseAccessConditions?: LeaseAccessConditions;
|
816
|
+
/**
|
817
|
+
* Optional.
|
818
|
+
* Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key.
|
819
|
+
*/
|
820
|
+
copyFileSmbInfo?: CopyFileSmbInfo;
|
821
|
+
/**
|
822
|
+
* Optional.
|
823
|
+
* The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>
|
824
|
+
*/
|
825
|
+
timeoutInSeconds?: number;
|
826
|
+
/**
|
827
|
+
* Optional.
|
828
|
+
* A name-value pair to associate with a file storage object.
|
829
|
+
*/
|
830
|
+
metadata?: Metadata;
|
831
|
+
/**
|
832
|
+
* Optional.
|
833
|
+
* If specified the permission (security descriptor) shall be set for the directory/file.
|
834
|
+
*/
|
835
|
+
filePermission?: string;
|
836
|
+
/**
|
837
|
+
* Optional.
|
838
|
+
* Key of the permission to be set for the directory/file. Note: Only one of the filePermission or filePermissionKey should be specified.
|
839
|
+
*/
|
840
|
+
filePermissionKey?: string;
|
841
|
+
/**
|
842
|
+
* Optional.
|
843
|
+
* A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value.
|
844
|
+
*/
|
845
|
+
replaceIfExists?: boolean;
|
846
|
+
/**
|
847
|
+
* Optional.
|
848
|
+
* A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail.
|
849
|
+
*/
|
850
|
+
ignoreReadOnly?: boolean;
|
851
|
+
}
|
852
|
+
/** Contains response data for the rename operation. */
|
853
|
+
export declare type DirectoryRenameResponse = DirectoryRenameHeaders & {
|
854
|
+
/** The underlying HTTP response. */
|
855
|
+
_response: coreHttp.HttpResponse & {
|
856
|
+
/** The parsed HTTP response headers. */
|
857
|
+
parsedHeaders: DirectoryRenameHeaders;
|
858
|
+
};
|
859
|
+
};
|
770
860
|
/** Defines headers for Directory_setMetadata operation. */
|
771
861
|
export declare interface DirectorySetMetadataHeaders {
|
772
862
|
/** The ETag contains a value which represents the version of the directory, in quotes. */
|
@@ -1683,6 +1773,95 @@ export declare interface FileProperty {
|
|
1683
1773
|
lastModified?: Date;
|
1684
1774
|
etag?: string;
|
1685
1775
|
}
|
1776
|
+
/** Defines headers for File_rename operation. */
|
1777
|
+
export declare interface FileRenameHeaders {
|
1778
|
+
/** The ETag contains a value which represents the version of the file, in quotes. */
|
1779
|
+
etag?: string;
|
1780
|
+
/** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */
|
1781
|
+
lastModified?: Date;
|
1782
|
+
/** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
|
1783
|
+
requestId?: string;
|
1784
|
+
/** Indicates the version of the File service used to execute the request. */
|
1785
|
+
version?: string;
|
1786
|
+
/** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */
|
1787
|
+
date?: Date;
|
1788
|
+
/** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
|
1789
|
+
isServerEncrypted?: boolean;
|
1790
|
+
/** Key of the permission set for the file. */
|
1791
|
+
filePermissionKey?: string;
|
1792
|
+
/** Attributes set for the file. */
|
1793
|
+
fileAttributes?: string;
|
1794
|
+
/** Creation time for the file. */
|
1795
|
+
fileCreationTime?: Date;
|
1796
|
+
/** Last write time for the file. */
|
1797
|
+
fileLastWriteTime?: Date;
|
1798
|
+
/** Change time for the file. */
|
1799
|
+
fileChangeTime?: Date;
|
1800
|
+
/** The fileId of the file. */
|
1801
|
+
fileId?: string;
|
1802
|
+
/** The parent fileId of the directory. */
|
1803
|
+
fileParentId?: string;
|
1804
|
+
}
|
1805
|
+
/**
|
1806
|
+
* Options to configure the {@link ShareFileClient.rename} operation.
|
1807
|
+
*/
|
1808
|
+
export declare interface FileRenameOptions extends CommonOptions {
|
1809
|
+
/**
|
1810
|
+
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
1811
|
+
* For example, use the @azure/abort-controller to create an `AbortSignal`.
|
1812
|
+
*/
|
1813
|
+
abortSignal?: AbortSignalLike;
|
1814
|
+
/**
|
1815
|
+
* Lease access condition for source file. Required if the source file has an active infinite lease.
|
1816
|
+
*/
|
1817
|
+
sourceLeaseAccessConditions?: LeaseAccessConditions;
|
1818
|
+
/**
|
1819
|
+
* Lease access condition for destination file. Required if the destination file has an active infinite lease.
|
1820
|
+
*/
|
1821
|
+
destinationLeaseAccessConditions?: LeaseAccessConditions;
|
1822
|
+
/**
|
1823
|
+
* Optional.
|
1824
|
+
* Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key.
|
1825
|
+
*/
|
1826
|
+
copyFileSmbInfo?: CopyFileSmbInfo;
|
1827
|
+
/**
|
1828
|
+
* A name-value pair to associate with a file storage object.
|
1829
|
+
*/
|
1830
|
+
metadata?: Metadata;
|
1831
|
+
/**
|
1832
|
+
* Optional.
|
1833
|
+
* The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>
|
1834
|
+
*/
|
1835
|
+
timeoutInSeconds?: number;
|
1836
|
+
/**
|
1837
|
+
* Optional.
|
1838
|
+
* If specified the permission (security descriptor) shall be set for the directory/file.
|
1839
|
+
*/
|
1840
|
+
filePermission?: string;
|
1841
|
+
/**
|
1842
|
+
* Optional.
|
1843
|
+
* Key of the permission to be set for the directory/file. Note: Only one of the filePermission or filePermissionKey should be specified.
|
1844
|
+
*/
|
1845
|
+
filePermissionKey?: string;
|
1846
|
+
/**
|
1847
|
+
* Optional.
|
1848
|
+
* A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value.
|
1849
|
+
*/
|
1850
|
+
replaceIfExists?: boolean;
|
1851
|
+
/**
|
1852
|
+
* Optional.
|
1853
|
+
* A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail.
|
1854
|
+
*/
|
1855
|
+
ignoreReadOnly?: boolean;
|
1856
|
+
}
|
1857
|
+
/** Contains response data for the rename operation. */
|
1858
|
+
export declare type FileRenameResponse = FileRenameHeaders & {
|
1859
|
+
/** The underlying HTTP response. */
|
1860
|
+
_response: coreHttp.HttpResponse & {
|
1861
|
+
/** The parsed HTTP response headers. */
|
1862
|
+
parsedHeaders: FileRenameHeaders;
|
1863
|
+
};
|
1864
|
+
};
|
1686
1865
|
/**
|
1687
1866
|
* Options to configure the {@link ShareFileClient.resize} operation.
|
1688
1867
|
*/
|
@@ -3725,6 +3904,27 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3725
3904
|
* @param options -
|
3726
3905
|
*/
|
3727
3906
|
forceCloseHandle(handleId: string, options?: DirectoryForceCloseHandlesOptions): Promise<DirectoryForceCloseHandlesResponse>;
|
3907
|
+
/**
|
3908
|
+
* Renames a directory.
|
3909
|
+
* This API only supports renaming a directory in the same share.
|
3910
|
+
*
|
3911
|
+
* @param destinationPath - Specifies the destination path to rename to. The path will be encoded to put into a URL to specify the destination.
|
3912
|
+
* @param options - Options for the renaming operation.
|
3913
|
+
* @returns Response data for the file renaming operation.
|
3914
|
+
*
|
3915
|
+
* Example usage:
|
3916
|
+
*
|
3917
|
+
* ```js
|
3918
|
+
*
|
3919
|
+
* // Rename the directory
|
3920
|
+
* await diretoryClient.rename(destinationPath);
|
3921
|
+
* console.log("Renamed directory successfully!");
|
3922
|
+
* ```
|
3923
|
+
*/
|
3924
|
+
rename(destinationPath: string, options?: DirectoryRenameOptions): Promise<{
|
3925
|
+
destinationDirectoryClient: ShareDirectoryClient;
|
3926
|
+
directoryRenameResponse: DirectoryRenameResponse;
|
3927
|
+
}>;
|
3728
3928
|
}
|
3729
3929
|
/**
|
3730
3930
|
* Options to configure the {@link ShareClient.exists} operation.
|
@@ -4278,6 +4478,27 @@ export declare class ShareFileClient extends StorageClient {
|
|
4278
4478
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
4279
4479
|
*/
|
4280
4480
|
generateSasUrl(options: FileGenerateSasUrlOptions): string;
|
4481
|
+
/**
|
4482
|
+
* Renames a file.
|
4483
|
+
* This API only supports renaming a file in the same share.
|
4484
|
+
*
|
4485
|
+
* @param destinationPath - Specifies the destination path to rename to. The path will be encoded to put into a URL to specify the destination.
|
4486
|
+
* @param options - Options for the renaming operation.
|
4487
|
+
* @returns Response data for the file renaming operation.
|
4488
|
+
*
|
4489
|
+
* Example usage:
|
4490
|
+
*
|
4491
|
+
* ```js
|
4492
|
+
*
|
4493
|
+
* // Rename the file
|
4494
|
+
* await fileClient.rename(destinationPath);
|
4495
|
+
* console.log("Renamed file successfully!");
|
4496
|
+
* ```
|
4497
|
+
*/
|
4498
|
+
rename(destinationPath: string, options?: FileRenameOptions): Promise<{
|
4499
|
+
destinationFileClient: ShareFileClient;
|
4500
|
+
fileRenameResponse: FileRenameResponse;
|
4501
|
+
}>;
|
4281
4502
|
}
|
4282
4503
|
/** The list of file ranges */
|
4283
4504
|
export declare interface ShareFileRangeList {
|
@@ -335,16 +335,16 @@ export declare interface CommonOptions {
|
|
335
335
|
|
336
336
|
/** Parameter group */
|
337
337
|
export declare interface CopyFileSmbInfo {
|
338
|
-
/** Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. */
|
339
|
-
filePermissionCopyMode?: PermissionCopyModeType;
|
340
|
-
/** Specifies the option to overwrite the target file if it already exists and has read-only attribute set. */
|
341
|
-
ignoreReadOnly?: boolean;
|
342
338
|
/** Specifies either the option to copy file attributes from a source file(source) to a target file or a list of attributes to set on a target file. */
|
343
339
|
fileAttributes?: string;
|
344
340
|
/** Specifies either the option to copy file creation time from a source file(source) to a target file or a time value in ISO 8601 format to set as creation time on a target file. */
|
345
341
|
fileCreationTime?: string;
|
346
342
|
/** Specifies either the option to copy file last write time from a source file(source) to a target file or a time value in ISO 8601 format to set as last write time on a target file. */
|
347
343
|
fileLastWriteTime?: string;
|
344
|
+
/** Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. */
|
345
|
+
filePermissionCopyMode?: PermissionCopyModeType;
|
346
|
+
/** Specifies the option to overwrite the target file if it already exists and has read-only attribute set. */
|
347
|
+
ignoreReadOnly?: boolean;
|
348
348
|
/** Specifies the option to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state. */
|
349
349
|
setArchiveAttribute?: boolean;
|
350
350
|
}
|
@@ -815,6 +815,99 @@ export declare interface DirectoryProperties extends FileAndDirectorySetProperti
|
|
815
815
|
abortSignal?: AbortSignalLike;
|
816
816
|
}
|
817
817
|
|
818
|
+
/** Defines headers for Directory_rename operation. */
|
819
|
+
export declare interface DirectoryRenameHeaders {
|
820
|
+
/** The ETag contains a value which represents the version of the file, in quotes. */
|
821
|
+
etag?: string;
|
822
|
+
/** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */
|
823
|
+
lastModified?: Date;
|
824
|
+
/** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
|
825
|
+
requestId?: string;
|
826
|
+
/** Indicates the version of the File service used to execute the request. */
|
827
|
+
version?: string;
|
828
|
+
/** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */
|
829
|
+
date?: Date;
|
830
|
+
/** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
|
831
|
+
isServerEncrypted?: boolean;
|
832
|
+
/** Key of the permission set for the file. */
|
833
|
+
filePermissionKey?: string;
|
834
|
+
/** Attributes set for the file. */
|
835
|
+
fileAttributes?: string;
|
836
|
+
/** Creation time for the file. */
|
837
|
+
fileCreationTime?: Date;
|
838
|
+
/** Last write time for the file. */
|
839
|
+
fileLastWriteTime?: Date;
|
840
|
+
/** Change time for the file. */
|
841
|
+
fileChangeTime?: Date;
|
842
|
+
/** The fileId of the file. */
|
843
|
+
fileId?: string;
|
844
|
+
/** The parent fileId of the directory. */
|
845
|
+
fileParentId?: string;
|
846
|
+
}
|
847
|
+
|
848
|
+
/**
|
849
|
+
* Options to configure the {@link ShareDirectoryClient.rename} operation.
|
850
|
+
*/
|
851
|
+
export declare interface DirectoryRenameOptions extends CommonOptions {
|
852
|
+
/**
|
853
|
+
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
854
|
+
* For example, use the @azure/abort-controller to create an `AbortSignal`.
|
855
|
+
*/
|
856
|
+
abortSignal?: AbortSignalLike;
|
857
|
+
/**
|
858
|
+
* Lease access condition for source file. Required if the source file has an active infinite lease.
|
859
|
+
*/
|
860
|
+
sourceLeaseAccessConditions?: LeaseAccessConditions;
|
861
|
+
/**
|
862
|
+
* Lease access condition for destination file. Required if the destination file has an active infinite lease.
|
863
|
+
*/
|
864
|
+
destinationLeaseAccessConditions?: LeaseAccessConditions;
|
865
|
+
/**
|
866
|
+
* Optional.
|
867
|
+
* Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key.
|
868
|
+
*/
|
869
|
+
copyFileSmbInfo?: CopyFileSmbInfo;
|
870
|
+
/**
|
871
|
+
* Optional.
|
872
|
+
* The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>
|
873
|
+
*/
|
874
|
+
timeoutInSeconds?: number;
|
875
|
+
/**
|
876
|
+
* Optional.
|
877
|
+
* A name-value pair to associate with a file storage object.
|
878
|
+
*/
|
879
|
+
metadata?: Metadata;
|
880
|
+
/**
|
881
|
+
* Optional.
|
882
|
+
* If specified the permission (security descriptor) shall be set for the directory/file.
|
883
|
+
*/
|
884
|
+
filePermission?: string;
|
885
|
+
/**
|
886
|
+
* Optional.
|
887
|
+
* Key of the permission to be set for the directory/file. Note: Only one of the filePermission or filePermissionKey should be specified.
|
888
|
+
*/
|
889
|
+
filePermissionKey?: string;
|
890
|
+
/**
|
891
|
+
* Optional.
|
892
|
+
* A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value.
|
893
|
+
*/
|
894
|
+
replaceIfExists?: boolean;
|
895
|
+
/**
|
896
|
+
* Optional.
|
897
|
+
* A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail.
|
898
|
+
*/
|
899
|
+
ignoreReadOnly?: boolean;
|
900
|
+
}
|
901
|
+
|
902
|
+
/** Contains response data for the rename operation. */
|
903
|
+
export declare type DirectoryRenameResponse = DirectoryRenameHeaders & {
|
904
|
+
/** The underlying HTTP response. */
|
905
|
+
_response: coreHttp.HttpResponse & {
|
906
|
+
/** The parsed HTTP response headers. */
|
907
|
+
parsedHeaders: DirectoryRenameHeaders;
|
908
|
+
};
|
909
|
+
};
|
910
|
+
|
818
911
|
/** Defines headers for Directory_setMetadata operation. */
|
819
912
|
export declare interface DirectorySetMetadataHeaders {
|
820
913
|
/** The ETag contains a value which represents the version of the directory, in quotes. */
|
@@ -1779,6 +1872,98 @@ export declare interface FileProperty {
|
|
1779
1872
|
etag?: string;
|
1780
1873
|
}
|
1781
1874
|
|
1875
|
+
/** Defines headers for File_rename operation. */
|
1876
|
+
export declare interface FileRenameHeaders {
|
1877
|
+
/** The ETag contains a value which represents the version of the file, in quotes. */
|
1878
|
+
etag?: string;
|
1879
|
+
/** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */
|
1880
|
+
lastModified?: Date;
|
1881
|
+
/** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
|
1882
|
+
requestId?: string;
|
1883
|
+
/** Indicates the version of the File service used to execute the request. */
|
1884
|
+
version?: string;
|
1885
|
+
/** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */
|
1886
|
+
date?: Date;
|
1887
|
+
/** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
|
1888
|
+
isServerEncrypted?: boolean;
|
1889
|
+
/** Key of the permission set for the file. */
|
1890
|
+
filePermissionKey?: string;
|
1891
|
+
/** Attributes set for the file. */
|
1892
|
+
fileAttributes?: string;
|
1893
|
+
/** Creation time for the file. */
|
1894
|
+
fileCreationTime?: Date;
|
1895
|
+
/** Last write time for the file. */
|
1896
|
+
fileLastWriteTime?: Date;
|
1897
|
+
/** Change time for the file. */
|
1898
|
+
fileChangeTime?: Date;
|
1899
|
+
/** The fileId of the file. */
|
1900
|
+
fileId?: string;
|
1901
|
+
/** The parent fileId of the directory. */
|
1902
|
+
fileParentId?: string;
|
1903
|
+
}
|
1904
|
+
|
1905
|
+
/**
|
1906
|
+
* Options to configure the {@link ShareFileClient.rename} operation.
|
1907
|
+
*/
|
1908
|
+
export declare interface FileRenameOptions extends CommonOptions {
|
1909
|
+
/**
|
1910
|
+
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
1911
|
+
* For example, use the @azure/abort-controller to create an `AbortSignal`.
|
1912
|
+
*/
|
1913
|
+
abortSignal?: AbortSignalLike;
|
1914
|
+
/**
|
1915
|
+
* Lease access condition for source file. Required if the source file has an active infinite lease.
|
1916
|
+
*/
|
1917
|
+
sourceLeaseAccessConditions?: LeaseAccessConditions;
|
1918
|
+
/**
|
1919
|
+
* Lease access condition for destination file. Required if the destination file has an active infinite lease.
|
1920
|
+
*/
|
1921
|
+
destinationLeaseAccessConditions?: LeaseAccessConditions;
|
1922
|
+
/**
|
1923
|
+
* Optional.
|
1924
|
+
* Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key.
|
1925
|
+
*/
|
1926
|
+
copyFileSmbInfo?: CopyFileSmbInfo;
|
1927
|
+
/**
|
1928
|
+
* A name-value pair to associate with a file storage object.
|
1929
|
+
*/
|
1930
|
+
metadata?: Metadata;
|
1931
|
+
/**
|
1932
|
+
* Optional.
|
1933
|
+
* The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>
|
1934
|
+
*/
|
1935
|
+
timeoutInSeconds?: number;
|
1936
|
+
/**
|
1937
|
+
* Optional.
|
1938
|
+
* If specified the permission (security descriptor) shall be set for the directory/file.
|
1939
|
+
*/
|
1940
|
+
filePermission?: string;
|
1941
|
+
/**
|
1942
|
+
* Optional.
|
1943
|
+
* Key of the permission to be set for the directory/file. Note: Only one of the filePermission or filePermissionKey should be specified.
|
1944
|
+
*/
|
1945
|
+
filePermissionKey?: string;
|
1946
|
+
/**
|
1947
|
+
* Optional.
|
1948
|
+
* A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value.
|
1949
|
+
*/
|
1950
|
+
replaceIfExists?: boolean;
|
1951
|
+
/**
|
1952
|
+
* Optional.
|
1953
|
+
* A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail.
|
1954
|
+
*/
|
1955
|
+
ignoreReadOnly?: boolean;
|
1956
|
+
}
|
1957
|
+
|
1958
|
+
/** Contains response data for the rename operation. */
|
1959
|
+
export declare type FileRenameResponse = FileRenameHeaders & {
|
1960
|
+
/** The underlying HTTP response. */
|
1961
|
+
_response: coreHttp.HttpResponse & {
|
1962
|
+
/** The parsed HTTP response headers. */
|
1963
|
+
parsedHeaders: FileRenameHeaders;
|
1964
|
+
};
|
1965
|
+
};
|
1966
|
+
|
1782
1967
|
/**
|
1783
1968
|
* Options to configure the {@link ShareFileClient.resize} operation.
|
1784
1969
|
*/
|
@@ -3909,6 +4094,27 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3909
4094
|
* @param options -
|
3910
4095
|
*/
|
3911
4096
|
forceCloseHandle(handleId: string, options?: DirectoryForceCloseHandlesOptions): Promise<DirectoryForceCloseHandlesResponse>;
|
4097
|
+
/**
|
4098
|
+
* Renames a directory.
|
4099
|
+
* This API only supports renaming a directory in the same share.
|
4100
|
+
*
|
4101
|
+
* @param destinationPath - Specifies the destination path to rename to. The path will be encoded to put into a URL to specify the destination.
|
4102
|
+
* @param options - Options for the renaming operation.
|
4103
|
+
* @returns Response data for the file renaming operation.
|
4104
|
+
*
|
4105
|
+
* Example usage:
|
4106
|
+
*
|
4107
|
+
* ```js
|
4108
|
+
*
|
4109
|
+
* // Rename the directory
|
4110
|
+
* await diretoryClient.rename(destinationPath);
|
4111
|
+
* console.log("Renamed directory successfully!");
|
4112
|
+
* ```
|
4113
|
+
*/
|
4114
|
+
rename(destinationPath: string, options?: DirectoryRenameOptions): Promise<{
|
4115
|
+
destinationDirectoryClient: ShareDirectoryClient;
|
4116
|
+
directoryRenameResponse: DirectoryRenameResponse;
|
4117
|
+
}>;
|
3912
4118
|
}
|
3913
4119
|
|
3914
4120
|
/**
|
@@ -4464,6 +4670,27 @@ export declare class ShareFileClient extends StorageClient {
|
|
4464
4670
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
4465
4671
|
*/
|
4466
4672
|
generateSasUrl(options: FileGenerateSasUrlOptions): string;
|
4673
|
+
/**
|
4674
|
+
* Renames a file.
|
4675
|
+
* This API only supports renaming a file in the same share.
|
4676
|
+
*
|
4677
|
+
* @param destinationPath - Specifies the destination path to rename to. The path will be encoded to put into a URL to specify the destination.
|
4678
|
+
* @param options - Options for the renaming operation.
|
4679
|
+
* @returns Response data for the file renaming operation.
|
4680
|
+
*
|
4681
|
+
* Example usage:
|
4682
|
+
*
|
4683
|
+
* ```js
|
4684
|
+
*
|
4685
|
+
* // Rename the file
|
4686
|
+
* await fileClient.rename(destinationPath);
|
4687
|
+
* console.log("Renamed file successfully!");
|
4688
|
+
* ```
|
4689
|
+
*/
|
4690
|
+
rename(destinationPath: string, options?: FileRenameOptions): Promise<{
|
4691
|
+
destinationFileClient: ShareFileClient;
|
4692
|
+
fileRenameResponse: FileRenameResponse;
|
4693
|
+
}>;
|
4467
4694
|
}
|
4468
4695
|
|
4469
4696
|
/** The list of file ranges */
|