@azure/storage-file-share 12.13.0-alpha.20230306.3 → 12.13.0-alpha.20230518.1
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/dist/index.js +159 -131
- package/dist/index.js.map +1 -1
- package/dist-esm/src/Clients.js +101 -80
- package/dist-esm/src/Clients.js.map +1 -1
- package/dist-esm/src/FileDownloadResponse.js +13 -13
- package/dist-esm/src/FileDownloadResponse.js.map +1 -1
- package/dist-esm/src/SASQueryParameters.js +14 -14
- package/dist-esm/src/SASQueryParameters.js.map +1 -1
- package/dist-esm/src/ShareServiceClient.js +31 -24
- package/dist-esm/src/ShareServiceClient.js.map +1 -1
- package/package.json +3 -3
package/dist-esm/src/Clients.js
CHANGED
@@ -28,6 +28,12 @@ import { generateFileSASQueryParameters } from "./FileSASSignatureValues";
|
|
28
28
|
* A ShareClient represents a URL to the Azure Storage share allowing you to manipulate its directories and files.
|
29
29
|
*/
|
30
30
|
export class ShareClient extends StorageClient {
|
31
|
+
/**
|
32
|
+
* The name of the share
|
33
|
+
*/
|
34
|
+
get name() {
|
35
|
+
return this._name;
|
36
|
+
}
|
31
37
|
constructor(urlOrConnectionString, credentialOrPipelineOrShareName,
|
32
38
|
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
33
39
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
@@ -81,12 +87,6 @@ export class ShareClient extends StorageClient {
|
|
81
87
|
this._name = getShareNameAndPathFromUrl(this.url).shareName;
|
82
88
|
this.context = new Share(this.storageClientContext);
|
83
89
|
}
|
84
|
-
/**
|
85
|
-
* The name of the share
|
86
|
-
*/
|
87
|
-
get name() {
|
88
|
-
return this._name;
|
89
|
-
}
|
90
90
|
/**
|
91
91
|
* Creates a new ShareClient object identical to the source but with the specified snapshot timestamp.
|
92
92
|
* Provide "" will remove the snapshot and return a URL to the base share.
|
@@ -719,6 +719,24 @@ export class ShareClient extends StorageClient {
|
|
719
719
|
* A ShareDirectoryClient represents a URL to the Azure Storage directory allowing you to manipulate its files and directories.
|
720
720
|
*/
|
721
721
|
export class ShareDirectoryClient extends StorageClient {
|
722
|
+
/**
|
723
|
+
* The share name corresponding to this directory client
|
724
|
+
*/
|
725
|
+
get shareName() {
|
726
|
+
return this._shareName;
|
727
|
+
}
|
728
|
+
/**
|
729
|
+
* The full path of the directory
|
730
|
+
*/
|
731
|
+
get path() {
|
732
|
+
return this._path;
|
733
|
+
}
|
734
|
+
/**
|
735
|
+
* The name of the directory
|
736
|
+
*/
|
737
|
+
get name() {
|
738
|
+
return this._name;
|
739
|
+
}
|
722
740
|
constructor(url, credentialOrPipeline, options = {}) {
|
723
741
|
let pipeline;
|
724
742
|
if (credentialOrPipeline instanceof Pipeline) {
|
@@ -739,24 +757,6 @@ export class ShareDirectoryClient extends StorageClient {
|
|
739
757
|
} = getShareNameAndPathFromUrl(this.url));
|
740
758
|
this.context = new Directory(this.storageClientContext);
|
741
759
|
}
|
742
|
-
/**
|
743
|
-
* The share name corresponding to this directory client
|
744
|
-
*/
|
745
|
-
get shareName() {
|
746
|
-
return this._shareName;
|
747
|
-
}
|
748
|
-
/**
|
749
|
-
* The full path of the directory
|
750
|
-
*/
|
751
|
-
get path() {
|
752
|
-
return this._path;
|
753
|
-
}
|
754
|
-
/**
|
755
|
-
* The name of the directory
|
756
|
-
*/
|
757
|
-
get name() {
|
758
|
-
return this._name;
|
759
|
-
}
|
760
760
|
/**
|
761
761
|
* Creates a new directory under the specified share or parent directory.
|
762
762
|
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-directory
|
@@ -1183,26 +1183,33 @@ export class ShareDirectoryClient extends StorageClient {
|
|
1183
1183
|
*/
|
1184
1184
|
listFilesAndDirectoriesItems(options = {}) {
|
1185
1185
|
return __asyncGenerator(this, arguments, function* listFilesAndDirectoriesItems_1() {
|
1186
|
-
var e_1,
|
1186
|
+
var _a, e_1, _b, _c;
|
1187
1187
|
if (options.prefix === "") {
|
1188
1188
|
options.prefix = undefined;
|
1189
1189
|
}
|
1190
1190
|
let marker;
|
1191
1191
|
try {
|
1192
|
-
for (var
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1192
|
+
for (var _d = true, _e = __asyncValues(this.iterateFilesAndDirectoriesSegments(marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
1193
|
+
_c = _f.value;
|
1194
|
+
_d = false;
|
1195
|
+
try {
|
1196
|
+
const listFilesAndDirectoriesResponse = _c;
|
1197
|
+
for (const file of listFilesAndDirectoriesResponse.segment.fileItems) {
|
1198
|
+
yield yield __await(Object.assign({ kind: "file" }, file));
|
1199
|
+
}
|
1200
|
+
for (const directory of listFilesAndDirectoriesResponse.segment.directoryItems) {
|
1201
|
+
yield yield __await(Object.assign({ kind: "directory" }, directory));
|
1202
|
+
}
|
1196
1203
|
}
|
1197
|
-
|
1198
|
-
|
1204
|
+
finally {
|
1205
|
+
_d = true;
|
1199
1206
|
}
|
1200
1207
|
}
|
1201
1208
|
}
|
1202
1209
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
1203
1210
|
finally {
|
1204
1211
|
try {
|
1205
|
-
if (
|
1212
|
+
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
1206
1213
|
}
|
1207
1214
|
finally { if (e_1) throw e_1.error; }
|
1208
1215
|
}
|
@@ -1396,22 +1403,29 @@ export class ShareDirectoryClient extends StorageClient {
|
|
1396
1403
|
*/
|
1397
1404
|
listHandleItems(options = {}) {
|
1398
1405
|
return __asyncGenerator(this, arguments, function* listHandleItems_1() {
|
1399
|
-
var e_2,
|
1406
|
+
var _a, e_2, _b, _c;
|
1400
1407
|
let marker;
|
1401
1408
|
try {
|
1402
|
-
for (var
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1409
|
+
for (var _d = true, _e = __asyncValues(this.iterateHandleSegments(marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
1410
|
+
_c = _f.value;
|
1411
|
+
_d = false;
|
1412
|
+
try {
|
1413
|
+
const listHandlesResponse = _c;
|
1414
|
+
if (listHandlesResponse.handleList) {
|
1415
|
+
for (const handle of listHandlesResponse.handleList) {
|
1416
|
+
yield yield __await(handle);
|
1417
|
+
}
|
1407
1418
|
}
|
1408
1419
|
}
|
1420
|
+
finally {
|
1421
|
+
_d = true;
|
1422
|
+
}
|
1409
1423
|
}
|
1410
1424
|
}
|
1411
1425
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
1412
1426
|
finally {
|
1413
1427
|
try {
|
1414
|
-
if (
|
1428
|
+
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
1415
1429
|
}
|
1416
1430
|
finally { if (e_2) throw e_2.error; }
|
1417
1431
|
}
|
@@ -1718,6 +1732,24 @@ export class ShareDirectoryClient extends StorageClient {
|
|
1718
1732
|
* A ShareFileClient represents a URL to an Azure Storage file.
|
1719
1733
|
*/
|
1720
1734
|
export class ShareFileClient extends StorageClient {
|
1735
|
+
/**
|
1736
|
+
* The share name corresponding to this file client
|
1737
|
+
*/
|
1738
|
+
get shareName() {
|
1739
|
+
return this._shareName;
|
1740
|
+
}
|
1741
|
+
/**
|
1742
|
+
* The full path of the file
|
1743
|
+
*/
|
1744
|
+
get path() {
|
1745
|
+
return this._path;
|
1746
|
+
}
|
1747
|
+
/**
|
1748
|
+
* The name of the file
|
1749
|
+
*/
|
1750
|
+
get name() {
|
1751
|
+
return this._name;
|
1752
|
+
}
|
1721
1753
|
constructor(url, credentialOrPipeline,
|
1722
1754
|
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
1723
1755
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
@@ -1741,24 +1773,6 @@ export class ShareFileClient extends StorageClient {
|
|
1741
1773
|
} = getShareNameAndPathFromUrl(this.url));
|
1742
1774
|
this.context = new File(this.storageClientContext);
|
1743
1775
|
}
|
1744
|
-
/**
|
1745
|
-
* The share name corresponding to this file client
|
1746
|
-
*/
|
1747
|
-
get shareName() {
|
1748
|
-
return this._shareName;
|
1749
|
-
}
|
1750
|
-
/**
|
1751
|
-
* The full path of the file
|
1752
|
-
*/
|
1753
|
-
get path() {
|
1754
|
-
return this._path;
|
1755
|
-
}
|
1756
|
-
/**
|
1757
|
-
* The name of the file
|
1758
|
-
*/
|
1759
|
-
get name() {
|
1760
|
-
return this._name;
|
1761
|
-
}
|
1762
1776
|
/**
|
1763
1777
|
* Creates a new ShareFileClient object identical to the source but with the specified share snapshot timestamp.
|
1764
1778
|
* Provide "" will remove the snapshot and return a URL to the base ShareFileClient.
|
@@ -2876,22 +2890,29 @@ export class ShareFileClient extends StorageClient {
|
|
2876
2890
|
*/
|
2877
2891
|
listHandleItems(options = {}) {
|
2878
2892
|
return __asyncGenerator(this, arguments, function* listHandleItems_2() {
|
2879
|
-
var e_3,
|
2893
|
+
var _a, e_3, _b, _c;
|
2880
2894
|
let marker;
|
2881
2895
|
try {
|
2882
|
-
for (var
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
2886
|
-
|
2896
|
+
for (var _d = true, _e = __asyncValues(this.iterateHandleSegments(marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
2897
|
+
_c = _f.value;
|
2898
|
+
_d = false;
|
2899
|
+
try {
|
2900
|
+
const listHandlesResponse = _c;
|
2901
|
+
if (listHandlesResponse.handleList) {
|
2902
|
+
for (const handle of listHandlesResponse.handleList) {
|
2903
|
+
yield yield __await(handle);
|
2904
|
+
}
|
2887
2905
|
}
|
2888
2906
|
}
|
2907
|
+
finally {
|
2908
|
+
_d = true;
|
2909
|
+
}
|
2889
2910
|
}
|
2890
2911
|
}
|
2891
2912
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
2892
2913
|
finally {
|
2893
2914
|
try {
|
2894
|
-
if (
|
2915
|
+
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
2895
2916
|
}
|
2896
2917
|
finally { if (e_3) throw e_3.error; }
|
2897
2918
|
}
|
@@ -3133,6 +3154,22 @@ export class ShareFileClient extends StorageClient {
|
|
3133
3154
|
* @see https://docs.microsoft.com/rest/api/storageservices/lease-share
|
3134
3155
|
*/
|
3135
3156
|
export class ShareLeaseClient {
|
3157
|
+
/**
|
3158
|
+
* Gets the lease Id.
|
3159
|
+
*
|
3160
|
+
* @readonly
|
3161
|
+
*/
|
3162
|
+
get leaseId() {
|
3163
|
+
return this._leaseId;
|
3164
|
+
}
|
3165
|
+
/**
|
3166
|
+
* Gets the url.
|
3167
|
+
*
|
3168
|
+
* @readonly
|
3169
|
+
*/
|
3170
|
+
get url() {
|
3171
|
+
return this._url;
|
3172
|
+
}
|
3136
3173
|
/**
|
3137
3174
|
* Creates an instance of ShareLeaseClient.
|
3138
3175
|
* @param client - The client to make the lease operation requests.
|
@@ -3154,22 +3191,6 @@ export class ShareLeaseClient {
|
|
3154
3191
|
}
|
3155
3192
|
this._leaseId = leaseId;
|
3156
3193
|
}
|
3157
|
-
/**
|
3158
|
-
* Gets the lease Id.
|
3159
|
-
*
|
3160
|
-
* @readonly
|
3161
|
-
*/
|
3162
|
-
get leaseId() {
|
3163
|
-
return this._leaseId;
|
3164
|
-
}
|
3165
|
-
/**
|
3166
|
-
* Gets the url.
|
3167
|
-
*
|
3168
|
-
* @readonly
|
3169
|
-
*/
|
3170
|
-
get url() {
|
3171
|
-
return this._url;
|
3172
|
-
}
|
3173
3194
|
/**
|
3174
3195
|
* Establishes and manages a lock on a file, share or share snapshot for write and delete operations.
|
3175
3196
|
*
|