@azure/storage-file-share 12.26.0 → 12.27.0-alpha.20250217.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/LICENSE +3 -3
- package/README.md +16 -18
- package/dist/index.js +1430 -431
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js +2 -2
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +10 -10
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +11 -11
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +43 -43
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +18 -18
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Range.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/models.js +2 -2
- package/dist-esm/storage-blob/src/models.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +2 -2
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +2 -2
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +1 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js +3 -3
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js +1 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASPermissions.js +2 -2
- package/dist-esm/storage-file-share/src/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/Clients.js +103 -78
- package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js +24 -0
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js +1 -1
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js.map +1 -1
- package/dist-esm/storage-file-share/src/Range.js.map +1 -1
- package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js +1 -1
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareServiceClient.js +13 -7
- package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/index.js +10 -0
- package/dist-esm/storage-file-share/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/mappers.js +544 -0
- package/dist-esm/storage-file-share/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/parameters.js +108 -3
- package/dist-esm/storage-file-share/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operations/directory.js +12 -10
- package/dist-esm/storage-file-share/src/generated/src/operations/directory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operations/file.js +125 -10
- package/dist-esm/storage-file-share/src/generated/src/operations/file.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/directory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/file.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js +2 -2
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.browser.js +1 -0
- package/dist-esm/storage-file-share/src/index.browser.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.js +1 -0
- package/dist-esm/storage-file-share/src/index.js.map +1 -1
- package/dist-esm/storage-file-share/src/models.js +0 -21
- package/dist-esm/storage-file-share/src/models.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/constants.js +2 -2
- package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.common.js +214 -2
- package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
- package/package.json +9 -9
- package/types/latest/storage-file-share.d.ts +968 -134
package/dist/index.js
CHANGED
@@ -132,12 +132,12 @@ class AccountSASPermissions {
|
|
132
132
|
* Using this method will guarantee the resource types are in
|
133
133
|
* an order accepted by the service.
|
134
134
|
*
|
135
|
-
* @see https://
|
135
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
|
136
136
|
*
|
137
137
|
*/
|
138
138
|
toString() {
|
139
139
|
// The order of the characters should be as specified here to ensure correctness:
|
140
|
-
// https://
|
140
|
+
// https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
|
141
141
|
// Use a string array instead of string concatenating += operator for performance
|
142
142
|
const permissions = [];
|
143
143
|
if (this.read) {
|
@@ -222,7 +222,7 @@ class AccountSASResourceTypes {
|
|
222
222
|
/**
|
223
223
|
* Converts the given resource types to a string.
|
224
224
|
*
|
225
|
-
* @see https://
|
225
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
|
226
226
|
*
|
227
227
|
*/
|
228
228
|
toString() {
|
@@ -336,8 +336,8 @@ function ipRangeToString(ipRange) {
|
|
336
336
|
|
337
337
|
// Copyright (c) Microsoft Corporation.
|
338
338
|
// Licensed under the MIT License.
|
339
|
-
const SDK_VERSION = "12.
|
340
|
-
const SERVICE_VERSION = "2025-
|
339
|
+
const SDK_VERSION = "12.27.0-beta.1";
|
340
|
+
const SERVICE_VERSION = "2025-05-05";
|
341
341
|
const FILE_MAX_SIZE_BYTES = 4 * 1024 * 1024 * 1024 * 1024; // 4TB
|
342
342
|
const FILE_RANGE_MAX_SIZE_BYTES = 4 * 1024 * 1024; // 4MB
|
343
343
|
const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;
|
@@ -349,14 +349,10 @@ const REQUEST_TIMEOUT = 100 * 1000; // In ms
|
|
349
349
|
const StorageOAuthScopes = "https://storage.azure.com/.default";
|
350
350
|
const URLConstants$1 = {
|
351
351
|
Parameters: {
|
352
|
-
FORCE_BROWSER_NO_CACHE: "_",
|
353
352
|
SHARE_SNAPSHOT: "sharesnapshot",
|
354
|
-
SIGNATURE: "sig",
|
355
353
|
TIMEOUT: "timeout",
|
356
354
|
},
|
357
355
|
};
|
358
|
-
const FileAttributesPreserve = "Preserve";
|
359
|
-
const FileAttributesNone = "None";
|
360
356
|
const StorageFileLoggingAllowedHeaderNames = [
|
361
357
|
"Access-Control-Allow-Origin",
|
362
358
|
"Cache-Control",
|
@@ -515,8 +511,8 @@ const PathStylePorts = [
|
|
515
511
|
*
|
516
512
|
* We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.
|
517
513
|
*
|
518
|
-
* @see https://
|
519
|
-
* @see https://
|
514
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata
|
515
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata
|
520
516
|
*
|
521
517
|
* @param url -
|
522
518
|
*/
|
@@ -925,6 +921,218 @@ function asSharePermission(value) {
|
|
925
921
|
permission: value,
|
926
922
|
};
|
927
923
|
}
|
924
|
+
/**
|
925
|
+
* Parse 4-digit octal string representation of a File Mode to a {@link NfsFileMode} structure.
|
926
|
+
*/
|
927
|
+
function parseOctalFileMode(input) {
|
928
|
+
if (input === undefined) {
|
929
|
+
return undefined;
|
930
|
+
}
|
931
|
+
if ((input === null || input === void 0 ? void 0 : input.length) !== 4) {
|
932
|
+
throw new Error("Invalid format of input string");
|
933
|
+
}
|
934
|
+
const nfsFileMode = {
|
935
|
+
owner: parseOctalRolePermissions(input[1]),
|
936
|
+
group: parseOctalRolePermissions(input[2]),
|
937
|
+
other: parseOctalRolePermissions(input[3]),
|
938
|
+
effectiveUserIdentity: false,
|
939
|
+
effectiveGroupIdentity: false,
|
940
|
+
stickyBit: false,
|
941
|
+
};
|
942
|
+
const value = Number.parseInt(input[0]);
|
943
|
+
if ((value & 4) > 0) {
|
944
|
+
nfsFileMode.effectiveUserIdentity = true;
|
945
|
+
}
|
946
|
+
if ((value & 2) > 0) {
|
947
|
+
nfsFileMode.effectiveGroupIdentity = true;
|
948
|
+
}
|
949
|
+
if ((value & 1) > 0) {
|
950
|
+
nfsFileMode.stickyBit = true;
|
951
|
+
}
|
952
|
+
return nfsFileMode;
|
953
|
+
}
|
954
|
+
/**
|
955
|
+
* Convert {@link NfsFileMode} structure to a 4-digit octal string represenation.
|
956
|
+
*/
|
957
|
+
function toOctalFileMode(input) {
|
958
|
+
if (input === undefined)
|
959
|
+
return undefined;
|
960
|
+
let higherOrderDigit = 0;
|
961
|
+
if (input === null || input === void 0 ? void 0 : input.effectiveUserIdentity) {
|
962
|
+
higherOrderDigit |= 4;
|
963
|
+
}
|
964
|
+
if (input === null || input === void 0 ? void 0 : input.effectiveGroupIdentity) {
|
965
|
+
higherOrderDigit |= 2;
|
966
|
+
}
|
967
|
+
if (input === null || input === void 0 ? void 0 : input.stickyBit) {
|
968
|
+
higherOrderDigit |= 1;
|
969
|
+
}
|
970
|
+
let stringFileMode = higherOrderDigit.toString();
|
971
|
+
stringFileMode += toOctalRolePermissions(input.owner);
|
972
|
+
stringFileMode += toOctalRolePermissions(input.group);
|
973
|
+
stringFileMode += toOctalRolePermissions(input.other);
|
974
|
+
return stringFileMode;
|
975
|
+
}
|
976
|
+
/**
|
977
|
+
* Convert a {@link NfsFileMode} to a string in symbolic notation.
|
978
|
+
*/
|
979
|
+
function toSymbolicFileMode(input) {
|
980
|
+
if (input === undefined)
|
981
|
+
return undefined;
|
982
|
+
let ownerPermissions = toSymbolicRolePermissions(input.owner);
|
983
|
+
let groupPermissions = toSymbolicRolePermissions(input.group);
|
984
|
+
let otherPermissions = toSymbolicRolePermissions(input.other);
|
985
|
+
if (input.effectiveUserIdentity) {
|
986
|
+
if (ownerPermissions[2] === "x") {
|
987
|
+
ownerPermissions = ownerPermissions.substring(0, 2) + "s";
|
988
|
+
}
|
989
|
+
else {
|
990
|
+
ownerPermissions = ownerPermissions.substring(0, 2) + "S";
|
991
|
+
}
|
992
|
+
}
|
993
|
+
if (input.effectiveGroupIdentity) {
|
994
|
+
if (groupPermissions[2] === "x") {
|
995
|
+
groupPermissions = groupPermissions.substring(0, 2) + "s";
|
996
|
+
}
|
997
|
+
else {
|
998
|
+
groupPermissions = groupPermissions.substring(0, 2) + "S";
|
999
|
+
}
|
1000
|
+
}
|
1001
|
+
if (input.stickyBit) {
|
1002
|
+
if (otherPermissions[2] === "x") {
|
1003
|
+
otherPermissions = otherPermissions.substring(0, 2) + "t";
|
1004
|
+
}
|
1005
|
+
else {
|
1006
|
+
otherPermissions = otherPermissions.substring(0, 2) + "T";
|
1007
|
+
}
|
1008
|
+
}
|
1009
|
+
return ownerPermissions + groupPermissions + otherPermissions;
|
1010
|
+
}
|
1011
|
+
/**
|
1012
|
+
* Parse a 9-character symbolic string representation of a File Mode to a {@link NfsFileMode} structure.
|
1013
|
+
*/
|
1014
|
+
function parseSymbolicFileMode(input) {
|
1015
|
+
if (input === undefined)
|
1016
|
+
return undefined;
|
1017
|
+
if ((input === null || input === void 0 ? void 0 : input.length) !== 9) {
|
1018
|
+
throw new Error("Invalid format of input string");
|
1019
|
+
}
|
1020
|
+
const ownerPermissions = parseSymbolicRolePermissions(input.substring(0, 3));
|
1021
|
+
const groupPermissions = parseSymbolicRolePermissions(input.substring(3, 6));
|
1022
|
+
const otherPermissions = parseSymbolicRolePermissions(input.substring(6, 9));
|
1023
|
+
const nfsFileMode = {
|
1024
|
+
owner: ownerPermissions.rolePermissions,
|
1025
|
+
group: groupPermissions.rolePermissions,
|
1026
|
+
other: otherPermissions.rolePermissions,
|
1027
|
+
effectiveUserIdentity: ownerPermissions.setSticky,
|
1028
|
+
effectiveGroupIdentity: groupPermissions.setSticky,
|
1029
|
+
stickyBit: otherPermissions.setSticky,
|
1030
|
+
};
|
1031
|
+
return nfsFileMode;
|
1032
|
+
}
|
1033
|
+
function parseOctalRolePermissions(c) {
|
1034
|
+
const rolePermissions = {
|
1035
|
+
read: false,
|
1036
|
+
write: false,
|
1037
|
+
execute: false,
|
1038
|
+
};
|
1039
|
+
const value = Number.parseInt(c);
|
1040
|
+
if (value < 0 || value > 7) {
|
1041
|
+
throw new Error("MustBeBetweenInclusive");
|
1042
|
+
}
|
1043
|
+
if ((value & 4) > 0) {
|
1044
|
+
rolePermissions.read = true;
|
1045
|
+
}
|
1046
|
+
if ((value & 2) > 0) {
|
1047
|
+
rolePermissions.write = true;
|
1048
|
+
}
|
1049
|
+
if ((value & 1) > 0) {
|
1050
|
+
rolePermissions.execute = true;
|
1051
|
+
}
|
1052
|
+
return rolePermissions;
|
1053
|
+
}
|
1054
|
+
function toOctalRolePermissions(rolePermissions) {
|
1055
|
+
let result = 0;
|
1056
|
+
if (rolePermissions.read === true) {
|
1057
|
+
result |= 4;
|
1058
|
+
}
|
1059
|
+
if (rolePermissions.write === true) {
|
1060
|
+
result |= 2;
|
1061
|
+
}
|
1062
|
+
if (rolePermissions.execute === true) {
|
1063
|
+
result |= 1;
|
1064
|
+
}
|
1065
|
+
return result.toString();
|
1066
|
+
}
|
1067
|
+
function toSymbolicRolePermissions(rolePermissions) {
|
1068
|
+
let symbolicRolePermissions = "";
|
1069
|
+
if (rolePermissions.read === true) {
|
1070
|
+
symbolicRolePermissions += "r";
|
1071
|
+
}
|
1072
|
+
else {
|
1073
|
+
symbolicRolePermissions += "-";
|
1074
|
+
}
|
1075
|
+
if (rolePermissions.write === true) {
|
1076
|
+
symbolicRolePermissions += "w";
|
1077
|
+
}
|
1078
|
+
else {
|
1079
|
+
symbolicRolePermissions += "-";
|
1080
|
+
}
|
1081
|
+
if (rolePermissions.execute === true) {
|
1082
|
+
symbolicRolePermissions += "x";
|
1083
|
+
}
|
1084
|
+
else {
|
1085
|
+
symbolicRolePermissions += "-";
|
1086
|
+
}
|
1087
|
+
return symbolicRolePermissions;
|
1088
|
+
}
|
1089
|
+
function parseSymbolicRolePermissions(input) {
|
1090
|
+
if (input.length !== 3) {
|
1091
|
+
throw new Error("input must be 3 characters long");
|
1092
|
+
}
|
1093
|
+
const rolePermissions = {
|
1094
|
+
read: false,
|
1095
|
+
write: false,
|
1096
|
+
execute: false,
|
1097
|
+
};
|
1098
|
+
let setSticky = false;
|
1099
|
+
// Read character
|
1100
|
+
if (input[0] === "r") {
|
1101
|
+
rolePermissions.read = true;
|
1102
|
+
}
|
1103
|
+
else if (input[0] !== "-") {
|
1104
|
+
throw new Error(`Invalid character in symbolic role permission: ${input[0]}`);
|
1105
|
+
}
|
1106
|
+
// Write character
|
1107
|
+
if (input[1] === "w") {
|
1108
|
+
rolePermissions.write = true;
|
1109
|
+
}
|
1110
|
+
else if (input[1] !== "-") {
|
1111
|
+
throw new Error(`Invalid character in symbolic role permission: ${input[1]}`);
|
1112
|
+
}
|
1113
|
+
// Execute character
|
1114
|
+
if (input[2] === "x" || input[2] === "s" || input[2] === "t") {
|
1115
|
+
rolePermissions.execute = true;
|
1116
|
+
if (input[2] === "s" || input[2] === "t") {
|
1117
|
+
setSticky = true;
|
1118
|
+
}
|
1119
|
+
}
|
1120
|
+
if (input[2] === "S" || input[2] === "T") {
|
1121
|
+
setSticky = true;
|
1122
|
+
}
|
1123
|
+
if (input[2] !== "x" &&
|
1124
|
+
input[2] !== "s" &&
|
1125
|
+
input[2] !== "S" &&
|
1126
|
+
input[2] !== "t" &&
|
1127
|
+
input[2] !== "T" &&
|
1128
|
+
input[2] !== "-") {
|
1129
|
+
throw new Error(`Invalid character in symbolic role permission: ${input[2]}`);
|
1130
|
+
}
|
1131
|
+
return {
|
1132
|
+
rolePermissions,
|
1133
|
+
setSticky,
|
1134
|
+
};
|
1135
|
+
}
|
928
1136
|
|
929
1137
|
// Copyright (c) Microsoft Corporation.
|
930
1138
|
// Licensed under the MIT License.
|
@@ -1109,7 +1317,7 @@ class SASQueryParameters {
|
|
1109
1317
|
* Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual
|
1110
1318
|
* REST request.
|
1111
1319
|
*
|
1112
|
-
* @see https://
|
1320
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
|
1113
1321
|
*
|
1114
1322
|
* @param sharedKeyCredential -
|
1115
1323
|
*/
|
@@ -1315,7 +1523,7 @@ class ShareSASPermissions {
|
|
1315
1523
|
* order accepted by the service.
|
1316
1524
|
*
|
1317
1525
|
* The order of the characters should be as specified here to ensure correctness.
|
1318
|
-
* @see https://
|
1526
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
1319
1527
|
*
|
1320
1528
|
*/
|
1321
1529
|
toString() {
|
@@ -1695,22 +1903,14 @@ class StorageRetryPolicyFactory {
|
|
1695
1903
|
// Licensed under the MIT License.
|
1696
1904
|
const URLConstants = {
|
1697
1905
|
Parameters: {
|
1698
|
-
FORCE_BROWSER_NO_CACHE: "_",
|
1699
|
-
SIGNATURE: "sig",
|
1700
|
-
SNAPSHOT: "snapshot",
|
1701
|
-
VERSIONID: "versionid",
|
1702
|
-
TIMEOUT: "timeout",
|
1703
|
-
},
|
1906
|
+
FORCE_BROWSER_NO_CACHE: "_"},
|
1704
1907
|
};
|
1705
1908
|
const HeaderConstants = {
|
1706
1909
|
AUTHORIZATION: "Authorization",
|
1707
|
-
AUTHORIZATION_SCHEME: "Bearer",
|
1708
1910
|
CONTENT_ENCODING: "Content-Encoding",
|
1709
|
-
CONTENT_ID: "Content-ID",
|
1710
1911
|
CONTENT_LANGUAGE: "Content-Language",
|
1711
1912
|
CONTENT_LENGTH: "Content-Length",
|
1712
1913
|
CONTENT_MD5: "Content-Md5",
|
1713
|
-
CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding",
|
1714
1914
|
CONTENT_TYPE: "Content-Type",
|
1715
1915
|
COOKIE: "Cookie",
|
1716
1916
|
DATE: "date",
|
@@ -1720,14 +1920,7 @@ const HeaderConstants = {
|
|
1720
1920
|
IF_UNMODIFIED_SINCE: "if-unmodified-since",
|
1721
1921
|
PREFIX_FOR_STORAGE: "x-ms-",
|
1722
1922
|
RANGE: "Range",
|
1723
|
-
|
1724
|
-
X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id",
|
1725
|
-
X_MS_COPY_SOURCE: "x-ms-copy-source",
|
1726
|
-
X_MS_DATE: "x-ms-date",
|
1727
|
-
X_MS_ERROR_CODE: "x-ms-error-code",
|
1728
|
-
X_MS_VERSION: "x-ms-version",
|
1729
|
-
X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code",
|
1730
|
-
};
|
1923
|
+
X_MS_DATE: "x-ms-date"};
|
1731
1924
|
|
1732
1925
|
// Copyright (c) Microsoft Corporation.
|
1733
1926
|
// Licensed under the MIT License.
|
@@ -1959,7 +2152,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
|
|
1959
2152
|
}
|
1960
2153
|
/**
|
1961
2154
|
* Retrieve header value according to shared key sign rules.
|
1962
|
-
* @see https://
|
2155
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
|
1963
2156
|
*
|
1964
2157
|
* @param request -
|
1965
2158
|
* @param headerName -
|
@@ -1971,7 +2164,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
|
|
1971
2164
|
}
|
1972
2165
|
// When using version 2015-02-21 or later, if Content-Length is zero, then
|
1973
2166
|
// set the Content-Length part of the StringToSign to an empty string.
|
1974
|
-
// https://
|
2167
|
+
// https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
|
1975
2168
|
if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") {
|
1976
2169
|
return "";
|
1977
2170
|
}
|
@@ -2199,7 +2392,6 @@ const DEFAULT_RETRY_OPTIONS = {
|
|
2199
2392
|
maxTries: 4,
|
2200
2393
|
retryDelayInMs: 4 * 1000,
|
2201
2394
|
retryPolicyType: StorageRetryPolicyType.EXPONENTIAL,
|
2202
|
-
secondaryHost: "",
|
2203
2395
|
tryTimeoutInMs: undefined, // Use server side default timeout strategy
|
2204
2396
|
};
|
2205
2397
|
const retriableErrors = [
|
@@ -2250,10 +2442,6 @@ function storageRetryPolicy(options = {}) {
|
|
2250
2442
|
// case, we'll never try the secondary again for this operation.
|
2251
2443
|
if (response || error) {
|
2252
2444
|
const statusCode = (_b = (_a = response === null || response === void 0 ? void 0 : response.status) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.statusCode) !== null && _b !== void 0 ? _b : 0;
|
2253
|
-
if (!isPrimaryRetry && statusCode === 404) {
|
2254
|
-
logger.info(`RetryPolicy: Secondary access with 404, will retry.`);
|
2255
|
-
return true;
|
2256
|
-
}
|
2257
2445
|
// Server internal error or server timeout
|
2258
2446
|
if (statusCode === 503 || statusCode === 500) {
|
2259
2447
|
logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);
|
@@ -2385,7 +2573,7 @@ function storageSharedKeyCredentialPolicy(options) {
|
|
2385
2573
|
}
|
2386
2574
|
/**
|
2387
2575
|
* Retrieve header value according to shared key sign rules.
|
2388
|
-
* @see https://
|
2576
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
|
2389
2577
|
*/
|
2390
2578
|
function getHeaderValueToSign(request, headerName) {
|
2391
2579
|
const value = request.headers.get(headerName);
|
@@ -2394,7 +2582,7 @@ function storageSharedKeyCredentialPolicy(options) {
|
|
2394
2582
|
}
|
2395
2583
|
// When using version 2015-02-21 or later, if Content-Length is zero, then
|
2396
2584
|
// set the Content-Length part of the StringToSign to an empty string.
|
2397
|
-
// https://
|
2585
|
+
// https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
|
2398
2586
|
if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") {
|
2399
2587
|
return "";
|
2400
2588
|
}
|
@@ -5712,6 +5900,34 @@ const DirectoryCreateHeaders = {
|
|
5712
5900
|
name: "String"
|
5713
5901
|
}
|
5714
5902
|
},
|
5903
|
+
fileMode: {
|
5904
|
+
serializedName: "x-ms-mode",
|
5905
|
+
xmlName: "x-ms-mode",
|
5906
|
+
type: {
|
5907
|
+
name: "String"
|
5908
|
+
}
|
5909
|
+
},
|
5910
|
+
owner: {
|
5911
|
+
serializedName: "x-ms-owner",
|
5912
|
+
xmlName: "x-ms-owner",
|
5913
|
+
type: {
|
5914
|
+
name: "String"
|
5915
|
+
}
|
5916
|
+
},
|
5917
|
+
group: {
|
5918
|
+
serializedName: "x-ms-group",
|
5919
|
+
xmlName: "x-ms-group",
|
5920
|
+
type: {
|
5921
|
+
name: "String"
|
5922
|
+
}
|
5923
|
+
},
|
5924
|
+
nfsFileType: {
|
5925
|
+
serializedName: "x-ms-file-file-type",
|
5926
|
+
xmlName: "x-ms-file-file-type",
|
5927
|
+
type: {
|
5928
|
+
name: "String"
|
5929
|
+
}
|
5930
|
+
},
|
5715
5931
|
errorCode: {
|
5716
5932
|
serializedName: "x-ms-error-code",
|
5717
5933
|
xmlName: "x-ms-error-code",
|
@@ -5844,6 +6060,34 @@ const DirectoryGetPropertiesHeaders = {
|
|
5844
6060
|
name: "String"
|
5845
6061
|
}
|
5846
6062
|
},
|
6063
|
+
fileMode: {
|
6064
|
+
serializedName: "x-ms-mode",
|
6065
|
+
xmlName: "x-ms-mode",
|
6066
|
+
type: {
|
6067
|
+
name: "String"
|
6068
|
+
}
|
6069
|
+
},
|
6070
|
+
owner: {
|
6071
|
+
serializedName: "x-ms-owner",
|
6072
|
+
xmlName: "x-ms-owner",
|
6073
|
+
type: {
|
6074
|
+
name: "String"
|
6075
|
+
}
|
6076
|
+
},
|
6077
|
+
group: {
|
6078
|
+
serializedName: "x-ms-group",
|
6079
|
+
xmlName: "x-ms-group",
|
6080
|
+
type: {
|
6081
|
+
name: "String"
|
6082
|
+
}
|
6083
|
+
},
|
6084
|
+
nfsFileType: {
|
6085
|
+
serializedName: "x-ms-file-file-type",
|
6086
|
+
xmlName: "x-ms-file-file-type",
|
6087
|
+
type: {
|
6088
|
+
name: "String"
|
6089
|
+
}
|
6090
|
+
},
|
5847
6091
|
errorCode: {
|
5848
6092
|
serializedName: "x-ms-error-code",
|
5849
6093
|
xmlName: "x-ms-error-code",
|
@@ -6020,6 +6264,27 @@ const DirectorySetPropertiesHeaders = {
|
|
6020
6264
|
name: "String"
|
6021
6265
|
}
|
6022
6266
|
},
|
6267
|
+
fileMode: {
|
6268
|
+
serializedName: "x-ms-mode",
|
6269
|
+
xmlName: "x-ms-mode",
|
6270
|
+
type: {
|
6271
|
+
name: "String"
|
6272
|
+
}
|
6273
|
+
},
|
6274
|
+
owner: {
|
6275
|
+
serializedName: "x-ms-owner",
|
6276
|
+
xmlName: "x-ms-owner",
|
6277
|
+
type: {
|
6278
|
+
name: "String"
|
6279
|
+
}
|
6280
|
+
},
|
6281
|
+
group: {
|
6282
|
+
serializedName: "x-ms-group",
|
6283
|
+
xmlName: "x-ms-group",
|
6284
|
+
type: {
|
6285
|
+
name: "String"
|
6286
|
+
}
|
6287
|
+
},
|
6023
6288
|
errorCode: {
|
6024
6289
|
serializedName: "x-ms-error-code",
|
6025
6290
|
xmlName: "x-ms-error-code",
|
@@ -6520,6 +6785,34 @@ const FileCreateHeaders = {
|
|
6520
6785
|
name: "String"
|
6521
6786
|
}
|
6522
6787
|
},
|
6788
|
+
fileMode: {
|
6789
|
+
serializedName: "x-ms-mode",
|
6790
|
+
xmlName: "x-ms-mode",
|
6791
|
+
type: {
|
6792
|
+
name: "String"
|
6793
|
+
}
|
6794
|
+
},
|
6795
|
+
owner: {
|
6796
|
+
serializedName: "x-ms-owner",
|
6797
|
+
xmlName: "x-ms-owner",
|
6798
|
+
type: {
|
6799
|
+
name: "String"
|
6800
|
+
}
|
6801
|
+
},
|
6802
|
+
group: {
|
6803
|
+
serializedName: "x-ms-group",
|
6804
|
+
xmlName: "x-ms-group",
|
6805
|
+
type: {
|
6806
|
+
name: "String"
|
6807
|
+
}
|
6808
|
+
},
|
6809
|
+
nfsFileType: {
|
6810
|
+
serializedName: "x-ms-file-file-type",
|
6811
|
+
xmlName: "x-ms-file-file-type",
|
6812
|
+
type: {
|
6813
|
+
name: "String"
|
6814
|
+
}
|
6815
|
+
},
|
6523
6816
|
errorCode: {
|
6524
6817
|
serializedName: "x-ms-error-code",
|
6525
6818
|
xmlName: "x-ms-error-code",
|
@@ -6795,6 +7088,34 @@ const FileDownloadHeaders = {
|
|
6795
7088
|
allowedValues: ["locked", "unlocked"]
|
6796
7089
|
}
|
6797
7090
|
},
|
7091
|
+
fileMode: {
|
7092
|
+
serializedName: "x-ms-mode",
|
7093
|
+
xmlName: "x-ms-mode",
|
7094
|
+
type: {
|
7095
|
+
name: "String"
|
7096
|
+
}
|
7097
|
+
},
|
7098
|
+
owner: {
|
7099
|
+
serializedName: "x-ms-owner",
|
7100
|
+
xmlName: "x-ms-owner",
|
7101
|
+
type: {
|
7102
|
+
name: "String"
|
7103
|
+
}
|
7104
|
+
},
|
7105
|
+
group: {
|
7106
|
+
serializedName: "x-ms-group",
|
7107
|
+
xmlName: "x-ms-group",
|
7108
|
+
type: {
|
7109
|
+
name: "String"
|
7110
|
+
}
|
7111
|
+
},
|
7112
|
+
linkCount: {
|
7113
|
+
serializedName: "x-ms-link-count",
|
7114
|
+
xmlName: "x-ms-link-count",
|
7115
|
+
type: {
|
7116
|
+
name: "Number"
|
7117
|
+
}
|
7118
|
+
},
|
6798
7119
|
errorCode: {
|
6799
7120
|
serializedName: "x-ms-error-code",
|
6800
7121
|
xmlName: "x-ms-error-code",
|
@@ -7056,6 +7377,41 @@ const FileGetPropertiesHeaders = {
|
|
7056
7377
|
allowedValues: ["locked", "unlocked"]
|
7057
7378
|
}
|
7058
7379
|
},
|
7380
|
+
fileMode: {
|
7381
|
+
serializedName: "x-ms-mode",
|
7382
|
+
xmlName: "x-ms-mode",
|
7383
|
+
type: {
|
7384
|
+
name: "String"
|
7385
|
+
}
|
7386
|
+
},
|
7387
|
+
owner: {
|
7388
|
+
serializedName: "x-ms-owner",
|
7389
|
+
xmlName: "x-ms-owner",
|
7390
|
+
type: {
|
7391
|
+
name: "String"
|
7392
|
+
}
|
7393
|
+
},
|
7394
|
+
group: {
|
7395
|
+
serializedName: "x-ms-group",
|
7396
|
+
xmlName: "x-ms-group",
|
7397
|
+
type: {
|
7398
|
+
name: "String"
|
7399
|
+
}
|
7400
|
+
},
|
7401
|
+
linkCount: {
|
7402
|
+
serializedName: "x-ms-link-count",
|
7403
|
+
xmlName: "x-ms-link-count",
|
7404
|
+
type: {
|
7405
|
+
name: "Number"
|
7406
|
+
}
|
7407
|
+
},
|
7408
|
+
nfsFileType: {
|
7409
|
+
serializedName: "x-ms-file-file-type",
|
7410
|
+
xmlName: "x-ms-file-file-type",
|
7411
|
+
type: {
|
7412
|
+
name: "String"
|
7413
|
+
}
|
7414
|
+
},
|
7059
7415
|
errorCode: {
|
7060
7416
|
serializedName: "x-ms-error-code",
|
7061
7417
|
xmlName: "x-ms-error-code",
|
@@ -7109,6 +7465,13 @@ const FileDeleteHeaders = {
|
|
7109
7465
|
name: "DateTimeRfc1123"
|
7110
7466
|
}
|
7111
7467
|
},
|
7468
|
+
linkCount: {
|
7469
|
+
serializedName: "x-ms-link-count",
|
7470
|
+
xmlName: "x-ms-link-count",
|
7471
|
+
type: {
|
7472
|
+
name: "Number"
|
7473
|
+
}
|
7474
|
+
},
|
7112
7475
|
errorCode: {
|
7113
7476
|
serializedName: "x-ms-error-code",
|
7114
7477
|
xmlName: "x-ms-error-code",
|
@@ -7232,6 +7595,34 @@ const FileSetHttpHeadersHeaders = {
|
|
7232
7595
|
name: "String"
|
7233
7596
|
}
|
7234
7597
|
},
|
7598
|
+
fileMode: {
|
7599
|
+
serializedName: "x-ms-mode",
|
7600
|
+
xmlName: "x-ms-mode",
|
7601
|
+
type: {
|
7602
|
+
name: "String"
|
7603
|
+
}
|
7604
|
+
},
|
7605
|
+
owner: {
|
7606
|
+
serializedName: "x-ms-owner",
|
7607
|
+
xmlName: "x-ms-owner",
|
7608
|
+
type: {
|
7609
|
+
name: "String"
|
7610
|
+
}
|
7611
|
+
},
|
7612
|
+
group: {
|
7613
|
+
serializedName: "x-ms-group",
|
7614
|
+
xmlName: "x-ms-group",
|
7615
|
+
type: {
|
7616
|
+
name: "String"
|
7617
|
+
}
|
7618
|
+
},
|
7619
|
+
linkCount: {
|
7620
|
+
serializedName: "x-ms-link-count",
|
7621
|
+
xmlName: "x-ms-link-count",
|
7622
|
+
type: {
|
7623
|
+
name: "Number"
|
7624
|
+
}
|
7625
|
+
},
|
7235
7626
|
errorCode: {
|
7236
7627
|
serializedName: "x-ms-error-code",
|
7237
7628
|
xmlName: "x-ms-error-code",
|
@@ -8249,69 +8640,416 @@ const FileRenameExceptionHeaders = {
|
|
8249
8640
|
}
|
8250
8641
|
}
|
8251
8642
|
};
|
8252
|
-
|
8253
|
-
|
8254
|
-
|
8255
|
-
|
8256
|
-
|
8257
|
-
|
8258
|
-
|
8259
|
-
|
8260
|
-
|
8261
|
-
|
8262
|
-
|
8263
|
-
|
8264
|
-
|
8265
|
-
|
8266
|
-
|
8267
|
-
|
8268
|
-
|
8269
|
-
|
8270
|
-
|
8271
|
-
|
8272
|
-
|
8273
|
-
|
8274
|
-
|
8275
|
-
|
8276
|
-
|
8277
|
-
|
8278
|
-
|
8279
|
-
|
8280
|
-
|
8281
|
-
|
8282
|
-
|
8283
|
-
|
8284
|
-
|
8285
|
-
|
8286
|
-
|
8287
|
-
|
8288
|
-
|
8289
|
-
|
8290
|
-
|
8291
|
-
|
8292
|
-
|
8293
|
-
|
8294
|
-
|
8295
|
-
|
8296
|
-
|
8297
|
-
|
8298
|
-
|
8299
|
-
|
8300
|
-
|
8301
|
-
|
8302
|
-
|
8303
|
-
|
8304
|
-
|
8305
|
-
|
8306
|
-
|
8307
|
-
|
8308
|
-
|
8309
|
-
|
8310
|
-
|
8311
|
-
|
8312
|
-
|
8313
|
-
|
8314
|
-
|
8643
|
+
const FileCreateSymbolicLinkHeaders = {
|
8644
|
+
serializedName: "File_createSymbolicLinkHeaders",
|
8645
|
+
type: {
|
8646
|
+
name: "Composite",
|
8647
|
+
className: "FileCreateSymbolicLinkHeaders",
|
8648
|
+
modelProperties: {
|
8649
|
+
etag: {
|
8650
|
+
serializedName: "etag",
|
8651
|
+
xmlName: "etag",
|
8652
|
+
type: {
|
8653
|
+
name: "String"
|
8654
|
+
}
|
8655
|
+
},
|
8656
|
+
lastModified: {
|
8657
|
+
serializedName: "last-modified",
|
8658
|
+
xmlName: "last-modified",
|
8659
|
+
type: {
|
8660
|
+
name: "DateTimeRfc1123"
|
8661
|
+
}
|
8662
|
+
},
|
8663
|
+
requestId: {
|
8664
|
+
serializedName: "x-ms-request-id",
|
8665
|
+
xmlName: "x-ms-request-id",
|
8666
|
+
type: {
|
8667
|
+
name: "String"
|
8668
|
+
}
|
8669
|
+
},
|
8670
|
+
version: {
|
8671
|
+
serializedName: "x-ms-version",
|
8672
|
+
xmlName: "x-ms-version",
|
8673
|
+
type: {
|
8674
|
+
name: "String"
|
8675
|
+
}
|
8676
|
+
},
|
8677
|
+
date: {
|
8678
|
+
serializedName: "date",
|
8679
|
+
xmlName: "date",
|
8680
|
+
type: {
|
8681
|
+
name: "DateTimeRfc1123"
|
8682
|
+
}
|
8683
|
+
},
|
8684
|
+
fileCreationTime: {
|
8685
|
+
serializedName: "x-ms-file-creation-time",
|
8686
|
+
xmlName: "x-ms-file-creation-time",
|
8687
|
+
type: {
|
8688
|
+
name: "DateTimeRfc1123"
|
8689
|
+
}
|
8690
|
+
},
|
8691
|
+
fileLastWriteTime: {
|
8692
|
+
serializedName: "x-ms-file-last-write-time",
|
8693
|
+
xmlName: "x-ms-file-last-write-time",
|
8694
|
+
type: {
|
8695
|
+
name: "DateTimeRfc1123"
|
8696
|
+
}
|
8697
|
+
},
|
8698
|
+
fileChangeTime: {
|
8699
|
+
serializedName: "x-ms-file-change-time",
|
8700
|
+
xmlName: "x-ms-file-change-time",
|
8701
|
+
type: {
|
8702
|
+
name: "DateTimeRfc1123"
|
8703
|
+
}
|
8704
|
+
},
|
8705
|
+
fileId: {
|
8706
|
+
serializedName: "x-ms-file-id",
|
8707
|
+
xmlName: "x-ms-file-id",
|
8708
|
+
type: {
|
8709
|
+
name: "String"
|
8710
|
+
}
|
8711
|
+
},
|
8712
|
+
fileParentId: {
|
8713
|
+
serializedName: "x-ms-file-parent-id",
|
8714
|
+
xmlName: "x-ms-file-parent-id",
|
8715
|
+
type: {
|
8716
|
+
name: "String"
|
8717
|
+
}
|
8718
|
+
},
|
8719
|
+
clientRequestId: {
|
8720
|
+
serializedName: "x-ms-client-request-id",
|
8721
|
+
xmlName: "x-ms-client-request-id",
|
8722
|
+
type: {
|
8723
|
+
name: "String"
|
8724
|
+
}
|
8725
|
+
},
|
8726
|
+
fileMode: {
|
8727
|
+
serializedName: "x-ms-mode",
|
8728
|
+
xmlName: "x-ms-mode",
|
8729
|
+
type: {
|
8730
|
+
name: "String"
|
8731
|
+
}
|
8732
|
+
},
|
8733
|
+
owner: {
|
8734
|
+
serializedName: "x-ms-owner",
|
8735
|
+
xmlName: "x-ms-owner",
|
8736
|
+
type: {
|
8737
|
+
name: "String"
|
8738
|
+
}
|
8739
|
+
},
|
8740
|
+
group: {
|
8741
|
+
serializedName: "x-ms-group",
|
8742
|
+
xmlName: "x-ms-group",
|
8743
|
+
type: {
|
8744
|
+
name: "String"
|
8745
|
+
}
|
8746
|
+
},
|
8747
|
+
nfsFileType: {
|
8748
|
+
serializedName: "x-ms-file-file-type",
|
8749
|
+
xmlName: "x-ms-file-file-type",
|
8750
|
+
type: {
|
8751
|
+
name: "String"
|
8752
|
+
}
|
8753
|
+
}
|
8754
|
+
}
|
8755
|
+
}
|
8756
|
+
};
|
8757
|
+
const FileCreateSymbolicLinkExceptionHeaders = {
|
8758
|
+
serializedName: "File_createSymbolicLinkExceptionHeaders",
|
8759
|
+
type: {
|
8760
|
+
name: "Composite",
|
8761
|
+
className: "FileCreateSymbolicLinkExceptionHeaders",
|
8762
|
+
modelProperties: {
|
8763
|
+
errorCode: {
|
8764
|
+
serializedName: "x-ms-error-code",
|
8765
|
+
xmlName: "x-ms-error-code",
|
8766
|
+
type: {
|
8767
|
+
name: "String"
|
8768
|
+
}
|
8769
|
+
}
|
8770
|
+
}
|
8771
|
+
}
|
8772
|
+
};
|
8773
|
+
const FileGetSymbolicLinkHeaders = {
|
8774
|
+
serializedName: "File_getSymbolicLinkHeaders",
|
8775
|
+
type: {
|
8776
|
+
name: "Composite",
|
8777
|
+
className: "FileGetSymbolicLinkHeaders",
|
8778
|
+
modelProperties: {
|
8779
|
+
etag: {
|
8780
|
+
serializedName: "etag",
|
8781
|
+
xmlName: "etag",
|
8782
|
+
type: {
|
8783
|
+
name: "String"
|
8784
|
+
}
|
8785
|
+
},
|
8786
|
+
lastModified: {
|
8787
|
+
serializedName: "last-modified",
|
8788
|
+
xmlName: "last-modified",
|
8789
|
+
type: {
|
8790
|
+
name: "DateTimeRfc1123"
|
8791
|
+
}
|
8792
|
+
},
|
8793
|
+
requestId: {
|
8794
|
+
serializedName: "x-ms-request-id",
|
8795
|
+
xmlName: "x-ms-request-id",
|
8796
|
+
type: {
|
8797
|
+
name: "String"
|
8798
|
+
}
|
8799
|
+
},
|
8800
|
+
version: {
|
8801
|
+
serializedName: "x-ms-version",
|
8802
|
+
xmlName: "x-ms-version",
|
8803
|
+
type: {
|
8804
|
+
name: "String"
|
8805
|
+
}
|
8806
|
+
},
|
8807
|
+
date: {
|
8808
|
+
serializedName: "date",
|
8809
|
+
xmlName: "date",
|
8810
|
+
type: {
|
8811
|
+
name: "DateTimeRfc1123"
|
8812
|
+
}
|
8813
|
+
},
|
8814
|
+
linkText: {
|
8815
|
+
serializedName: "x-ms-link-text",
|
8816
|
+
xmlName: "x-ms-link-text",
|
8817
|
+
type: {
|
8818
|
+
name: "String"
|
8819
|
+
}
|
8820
|
+
},
|
8821
|
+
clientRequestId: {
|
8822
|
+
serializedName: "x-ms-client-request-id",
|
8823
|
+
xmlName: "x-ms-client-request-id",
|
8824
|
+
type: {
|
8825
|
+
name: "String"
|
8826
|
+
}
|
8827
|
+
}
|
8828
|
+
}
|
8829
|
+
}
|
8830
|
+
};
|
8831
|
+
const FileGetSymbolicLinkExceptionHeaders = {
|
8832
|
+
serializedName: "File_getSymbolicLinkExceptionHeaders",
|
8833
|
+
type: {
|
8834
|
+
name: "Composite",
|
8835
|
+
className: "FileGetSymbolicLinkExceptionHeaders",
|
8836
|
+
modelProperties: {
|
8837
|
+
errorCode: {
|
8838
|
+
serializedName: "x-ms-error-code",
|
8839
|
+
xmlName: "x-ms-error-code",
|
8840
|
+
type: {
|
8841
|
+
name: "String"
|
8842
|
+
}
|
8843
|
+
}
|
8844
|
+
}
|
8845
|
+
}
|
8846
|
+
};
|
8847
|
+
const FileCreateHardLinkHeaders = {
|
8848
|
+
serializedName: "File_createHardLinkHeaders",
|
8849
|
+
type: {
|
8850
|
+
name: "Composite",
|
8851
|
+
className: "FileCreateHardLinkHeaders",
|
8852
|
+
modelProperties: {
|
8853
|
+
etag: {
|
8854
|
+
serializedName: "etag",
|
8855
|
+
xmlName: "etag",
|
8856
|
+
type: {
|
8857
|
+
name: "String"
|
8858
|
+
}
|
8859
|
+
},
|
8860
|
+
lastModified: {
|
8861
|
+
serializedName: "last-modified",
|
8862
|
+
xmlName: "last-modified",
|
8863
|
+
type: {
|
8864
|
+
name: "DateTimeRfc1123"
|
8865
|
+
}
|
8866
|
+
},
|
8867
|
+
requestId: {
|
8868
|
+
serializedName: "x-ms-request-id",
|
8869
|
+
xmlName: "x-ms-request-id",
|
8870
|
+
type: {
|
8871
|
+
name: "String"
|
8872
|
+
}
|
8873
|
+
},
|
8874
|
+
version: {
|
8875
|
+
serializedName: "x-ms-version",
|
8876
|
+
xmlName: "x-ms-version",
|
8877
|
+
type: {
|
8878
|
+
name: "String"
|
8879
|
+
}
|
8880
|
+
},
|
8881
|
+
date: {
|
8882
|
+
serializedName: "date",
|
8883
|
+
xmlName: "date",
|
8884
|
+
type: {
|
8885
|
+
name: "DateTimeRfc1123"
|
8886
|
+
}
|
8887
|
+
},
|
8888
|
+
fileCreationTime: {
|
8889
|
+
serializedName: "x-ms-file-creation-time",
|
8890
|
+
xmlName: "x-ms-file-creation-time",
|
8891
|
+
type: {
|
8892
|
+
name: "DateTimeRfc1123"
|
8893
|
+
}
|
8894
|
+
},
|
8895
|
+
fileLastWriteTime: {
|
8896
|
+
serializedName: "x-ms-file-last-write-time",
|
8897
|
+
xmlName: "x-ms-file-last-write-time",
|
8898
|
+
type: {
|
8899
|
+
name: "DateTimeRfc1123"
|
8900
|
+
}
|
8901
|
+
},
|
8902
|
+
fileChangeTime: {
|
8903
|
+
serializedName: "x-ms-file-change-time",
|
8904
|
+
xmlName: "x-ms-file-change-time",
|
8905
|
+
type: {
|
8906
|
+
name: "DateTimeRfc1123"
|
8907
|
+
}
|
8908
|
+
},
|
8909
|
+
fileId: {
|
8910
|
+
serializedName: "x-ms-file-id",
|
8911
|
+
xmlName: "x-ms-file-id",
|
8912
|
+
type: {
|
8913
|
+
name: "String"
|
8914
|
+
}
|
8915
|
+
},
|
8916
|
+
fileParentId: {
|
8917
|
+
serializedName: "x-ms-file-parent-id",
|
8918
|
+
xmlName: "x-ms-file-parent-id",
|
8919
|
+
type: {
|
8920
|
+
name: "String"
|
8921
|
+
}
|
8922
|
+
},
|
8923
|
+
clientRequestId: {
|
8924
|
+
serializedName: "x-ms-client-request-id",
|
8925
|
+
xmlName: "x-ms-client-request-id",
|
8926
|
+
type: {
|
8927
|
+
name: "String"
|
8928
|
+
}
|
8929
|
+
},
|
8930
|
+
linkCount: {
|
8931
|
+
serializedName: "x-ms-link-count",
|
8932
|
+
xmlName: "x-ms-link-count",
|
8933
|
+
type: {
|
8934
|
+
name: "Number"
|
8935
|
+
}
|
8936
|
+
},
|
8937
|
+
fileMode: {
|
8938
|
+
serializedName: "x-ms-mode",
|
8939
|
+
xmlName: "x-ms-mode",
|
8940
|
+
type: {
|
8941
|
+
name: "String"
|
8942
|
+
}
|
8943
|
+
},
|
8944
|
+
owner: {
|
8945
|
+
serializedName: "x-ms-owner",
|
8946
|
+
xmlName: "x-ms-owner",
|
8947
|
+
type: {
|
8948
|
+
name: "String"
|
8949
|
+
}
|
8950
|
+
},
|
8951
|
+
group: {
|
8952
|
+
serializedName: "x-ms-group",
|
8953
|
+
xmlName: "x-ms-group",
|
8954
|
+
type: {
|
8955
|
+
name: "String"
|
8956
|
+
}
|
8957
|
+
},
|
8958
|
+
nfsFileType: {
|
8959
|
+
serializedName: "x-ms-file-file-type",
|
8960
|
+
xmlName: "x-ms-file-file-type",
|
8961
|
+
type: {
|
8962
|
+
name: "String"
|
8963
|
+
}
|
8964
|
+
}
|
8965
|
+
}
|
8966
|
+
}
|
8967
|
+
};
|
8968
|
+
const FileCreateHardLinkExceptionHeaders = {
|
8969
|
+
serializedName: "File_createHardLinkExceptionHeaders",
|
8970
|
+
type: {
|
8971
|
+
name: "Composite",
|
8972
|
+
className: "FileCreateHardLinkExceptionHeaders",
|
8973
|
+
modelProperties: {
|
8974
|
+
errorCode: {
|
8975
|
+
serializedName: "x-ms-error-code",
|
8976
|
+
xmlName: "x-ms-error-code",
|
8977
|
+
type: {
|
8978
|
+
name: "String"
|
8979
|
+
}
|
8980
|
+
}
|
8981
|
+
}
|
8982
|
+
}
|
8983
|
+
};
|
8984
|
+
|
8985
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
8986
|
+
__proto__: null,
|
8987
|
+
AccessPolicy: AccessPolicy,
|
8988
|
+
ClearRange: ClearRange,
|
8989
|
+
CorsRule: CorsRule,
|
8990
|
+
DirectoryCreateExceptionHeaders: DirectoryCreateExceptionHeaders,
|
8991
|
+
DirectoryCreateHeaders: DirectoryCreateHeaders,
|
8992
|
+
DirectoryDeleteExceptionHeaders: DirectoryDeleteExceptionHeaders,
|
8993
|
+
DirectoryDeleteHeaders: DirectoryDeleteHeaders,
|
8994
|
+
DirectoryForceCloseHandlesExceptionHeaders: DirectoryForceCloseHandlesExceptionHeaders,
|
8995
|
+
DirectoryForceCloseHandlesHeaders: DirectoryForceCloseHandlesHeaders,
|
8996
|
+
DirectoryGetPropertiesExceptionHeaders: DirectoryGetPropertiesExceptionHeaders,
|
8997
|
+
DirectoryGetPropertiesHeaders: DirectoryGetPropertiesHeaders,
|
8998
|
+
DirectoryItem: DirectoryItem,
|
8999
|
+
DirectoryListFilesAndDirectoriesSegmentExceptionHeaders: DirectoryListFilesAndDirectoriesSegmentExceptionHeaders,
|
9000
|
+
DirectoryListFilesAndDirectoriesSegmentHeaders: DirectoryListFilesAndDirectoriesSegmentHeaders,
|
9001
|
+
DirectoryListHandlesExceptionHeaders: DirectoryListHandlesExceptionHeaders,
|
9002
|
+
DirectoryListHandlesHeaders: DirectoryListHandlesHeaders,
|
9003
|
+
DirectoryRenameExceptionHeaders: DirectoryRenameExceptionHeaders,
|
9004
|
+
DirectoryRenameHeaders: DirectoryRenameHeaders,
|
9005
|
+
DirectorySetMetadataExceptionHeaders: DirectorySetMetadataExceptionHeaders,
|
9006
|
+
DirectorySetMetadataHeaders: DirectorySetMetadataHeaders,
|
9007
|
+
DirectorySetPropertiesExceptionHeaders: DirectorySetPropertiesExceptionHeaders,
|
9008
|
+
DirectorySetPropertiesHeaders: DirectorySetPropertiesHeaders,
|
9009
|
+
FileAbortCopyExceptionHeaders: FileAbortCopyExceptionHeaders,
|
9010
|
+
FileAbortCopyHeaders: FileAbortCopyHeaders,
|
9011
|
+
FileAcquireLeaseExceptionHeaders: FileAcquireLeaseExceptionHeaders,
|
9012
|
+
FileAcquireLeaseHeaders: FileAcquireLeaseHeaders,
|
9013
|
+
FileBreakLeaseExceptionHeaders: FileBreakLeaseExceptionHeaders,
|
9014
|
+
FileBreakLeaseHeaders: FileBreakLeaseHeaders,
|
9015
|
+
FileChangeLeaseExceptionHeaders: FileChangeLeaseExceptionHeaders,
|
9016
|
+
FileChangeLeaseHeaders: FileChangeLeaseHeaders,
|
9017
|
+
FileCreateExceptionHeaders: FileCreateExceptionHeaders,
|
9018
|
+
FileCreateHardLinkExceptionHeaders: FileCreateHardLinkExceptionHeaders,
|
9019
|
+
FileCreateHardLinkHeaders: FileCreateHardLinkHeaders,
|
9020
|
+
FileCreateHeaders: FileCreateHeaders,
|
9021
|
+
FileCreateSymbolicLinkExceptionHeaders: FileCreateSymbolicLinkExceptionHeaders,
|
9022
|
+
FileCreateSymbolicLinkHeaders: FileCreateSymbolicLinkHeaders,
|
9023
|
+
FileDeleteExceptionHeaders: FileDeleteExceptionHeaders,
|
9024
|
+
FileDeleteHeaders: FileDeleteHeaders,
|
9025
|
+
FileDownloadExceptionHeaders: FileDownloadExceptionHeaders,
|
9026
|
+
FileDownloadHeaders: FileDownloadHeaders,
|
9027
|
+
FileForceCloseHandlesExceptionHeaders: FileForceCloseHandlesExceptionHeaders,
|
9028
|
+
FileForceCloseHandlesHeaders: FileForceCloseHandlesHeaders,
|
9029
|
+
FileGetPropertiesExceptionHeaders: FileGetPropertiesExceptionHeaders,
|
9030
|
+
FileGetPropertiesHeaders: FileGetPropertiesHeaders,
|
9031
|
+
FileGetRangeListExceptionHeaders: FileGetRangeListExceptionHeaders,
|
9032
|
+
FileGetRangeListHeaders: FileGetRangeListHeaders,
|
9033
|
+
FileGetSymbolicLinkExceptionHeaders: FileGetSymbolicLinkExceptionHeaders,
|
9034
|
+
FileGetSymbolicLinkHeaders: FileGetSymbolicLinkHeaders,
|
9035
|
+
FileItem: FileItem,
|
9036
|
+
FileListHandlesExceptionHeaders: FileListHandlesExceptionHeaders,
|
9037
|
+
FileListHandlesHeaders: FileListHandlesHeaders,
|
9038
|
+
FileProperty: FileProperty,
|
9039
|
+
FileRange: FileRange,
|
9040
|
+
FileReleaseLeaseExceptionHeaders: FileReleaseLeaseExceptionHeaders,
|
9041
|
+
FileReleaseLeaseHeaders: FileReleaseLeaseHeaders,
|
9042
|
+
FileRenameExceptionHeaders: FileRenameExceptionHeaders,
|
9043
|
+
FileRenameHeaders: FileRenameHeaders,
|
9044
|
+
FileServiceProperties: FileServiceProperties,
|
9045
|
+
FileSetHttpHeadersExceptionHeaders: FileSetHttpHeadersExceptionHeaders,
|
9046
|
+
FileSetHttpHeadersHeaders: FileSetHttpHeadersHeaders,
|
9047
|
+
FileSetMetadataExceptionHeaders: FileSetMetadataExceptionHeaders,
|
9048
|
+
FileSetMetadataHeaders: FileSetMetadataHeaders,
|
9049
|
+
FileStartCopyExceptionHeaders: FileStartCopyExceptionHeaders,
|
9050
|
+
FileStartCopyHeaders: FileStartCopyHeaders,
|
9051
|
+
FileUploadRangeExceptionHeaders: FileUploadRangeExceptionHeaders,
|
9052
|
+
FileUploadRangeFromURLExceptionHeaders: FileUploadRangeFromURLExceptionHeaders,
|
8315
9053
|
FileUploadRangeFromURLHeaders: FileUploadRangeFromURLHeaders,
|
8316
9054
|
FileUploadRangeHeaders: FileUploadRangeHeaders,
|
8317
9055
|
FilesAndDirectoriesListSegment: FilesAndDirectoriesListSegment,
|
@@ -8457,7 +9195,7 @@ const timeoutInSeconds = {
|
|
8457
9195
|
const version = {
|
8458
9196
|
parameterPath: "version",
|
8459
9197
|
mapper: {
|
8460
|
-
defaultValue: "2025-
|
9198
|
+
defaultValue: "2025-05-05",
|
8461
9199
|
isConstant: true,
|
8462
9200
|
serializedName: "x-ms-version",
|
8463
9201
|
type: {
|
@@ -9018,10 +9756,9 @@ const filePermissionKey1 = {
|
|
9018
9756
|
}
|
9019
9757
|
};
|
9020
9758
|
const fileAttributes = {
|
9021
|
-
parameterPath: "fileAttributes",
|
9759
|
+
parameterPath: ["options", "fileAttributes"],
|
9022
9760
|
mapper: {
|
9023
9761
|
serializedName: "x-ms-file-attributes",
|
9024
|
-
required: true,
|
9025
9762
|
xmlName: "x-ms-file-attributes",
|
9026
9763
|
type: {
|
9027
9764
|
name: "String"
|
@@ -9058,6 +9795,36 @@ const fileChangeOn = {
|
|
9058
9795
|
}
|
9059
9796
|
}
|
9060
9797
|
};
|
9798
|
+
const owner = {
|
9799
|
+
parameterPath: ["options", "owner"],
|
9800
|
+
mapper: {
|
9801
|
+
serializedName: "x-ms-owner",
|
9802
|
+
xmlName: "x-ms-owner",
|
9803
|
+
type: {
|
9804
|
+
name: "String"
|
9805
|
+
}
|
9806
|
+
}
|
9807
|
+
};
|
9808
|
+
const group = {
|
9809
|
+
parameterPath: ["options", "group"],
|
9810
|
+
mapper: {
|
9811
|
+
serializedName: "x-ms-group",
|
9812
|
+
xmlName: "x-ms-group",
|
9813
|
+
type: {
|
9814
|
+
name: "String"
|
9815
|
+
}
|
9816
|
+
}
|
9817
|
+
};
|
9818
|
+
const fileMode = {
|
9819
|
+
parameterPath: ["options", "fileMode"],
|
9820
|
+
mapper: {
|
9821
|
+
serializedName: "x-ms-mode",
|
9822
|
+
xmlName: "x-ms-mode",
|
9823
|
+
type: {
|
9824
|
+
name: "String"
|
9825
|
+
}
|
9826
|
+
}
|
9827
|
+
};
|
9061
9828
|
const include1 = {
|
9062
9829
|
parameterPath: ["options", "include"],
|
9063
9830
|
mapper: {
|
@@ -9327,6 +10094,16 @@ const fileContentDisposition = {
|
|
9327
10094
|
}
|
9328
10095
|
}
|
9329
10096
|
};
|
10097
|
+
const nfsFileType = {
|
10098
|
+
parameterPath: ["options", "nfsFileType"],
|
10099
|
+
mapper: {
|
10100
|
+
serializedName: "x-ms-file-file-type",
|
10101
|
+
xmlName: "x-ms-file-file-type",
|
10102
|
+
type: {
|
10103
|
+
name: "String"
|
10104
|
+
}
|
10105
|
+
}
|
10106
|
+
};
|
9330
10107
|
const range = {
|
9331
10108
|
parameterPath: ["options", "range"],
|
9332
10109
|
mapper: {
|
@@ -9598,34 +10375,100 @@ const setArchiveAttribute = {
|
|
9598
10375
|
}
|
9599
10376
|
}
|
9600
10377
|
};
|
9601
|
-
const
|
9602
|
-
parameterPath: "
|
10378
|
+
const fileModeCopyMode = {
|
10379
|
+
parameterPath: ["options", "fileModeCopyMode"],
|
10380
|
+
mapper: {
|
10381
|
+
serializedName: "x-ms-file-mode-copy-mode",
|
10382
|
+
xmlName: "x-ms-file-mode-copy-mode",
|
10383
|
+
type: {
|
10384
|
+
name: "Enum",
|
10385
|
+
allowedValues: ["source", "override"]
|
10386
|
+
}
|
10387
|
+
}
|
10388
|
+
};
|
10389
|
+
const fileOwnerCopyMode = {
|
10390
|
+
parameterPath: ["options", "fileOwnerCopyMode"],
|
10391
|
+
mapper: {
|
10392
|
+
serializedName: "x-ms-file-owner-copy-mode",
|
10393
|
+
xmlName: "x-ms-file-owner-copy-mode",
|
10394
|
+
type: {
|
10395
|
+
name: "Enum",
|
10396
|
+
allowedValues: ["source", "override"]
|
10397
|
+
}
|
10398
|
+
}
|
10399
|
+
};
|
10400
|
+
const comp14 = {
|
10401
|
+
parameterPath: "comp",
|
10402
|
+
mapper: {
|
10403
|
+
defaultValue: "copy",
|
10404
|
+
isConstant: true,
|
10405
|
+
serializedName: "comp",
|
10406
|
+
type: {
|
10407
|
+
name: "String"
|
10408
|
+
}
|
10409
|
+
}
|
10410
|
+
};
|
10411
|
+
const copyId = {
|
10412
|
+
parameterPath: "copyId",
|
10413
|
+
mapper: {
|
10414
|
+
serializedName: "copyid",
|
10415
|
+
required: true,
|
10416
|
+
xmlName: "copyid",
|
10417
|
+
type: {
|
10418
|
+
name: "String"
|
10419
|
+
}
|
10420
|
+
}
|
10421
|
+
};
|
10422
|
+
const copyActionAbortConstant = {
|
10423
|
+
parameterPath: "copyActionAbortConstant",
|
10424
|
+
mapper: {
|
10425
|
+
defaultValue: "abort",
|
10426
|
+
isConstant: true,
|
10427
|
+
serializedName: "x-ms-copy-action",
|
10428
|
+
type: {
|
10429
|
+
name: "String"
|
10430
|
+
}
|
10431
|
+
}
|
10432
|
+
};
|
10433
|
+
const restype3 = {
|
10434
|
+
parameterPath: "restype",
|
9603
10435
|
mapper: {
|
9604
|
-
defaultValue: "
|
10436
|
+
defaultValue: "symboliclink",
|
9605
10437
|
isConstant: true,
|
9606
|
-
serializedName: "
|
10438
|
+
serializedName: "restype",
|
9607
10439
|
type: {
|
9608
10440
|
name: "String"
|
9609
10441
|
}
|
9610
10442
|
}
|
9611
10443
|
};
|
9612
|
-
const
|
9613
|
-
parameterPath: "
|
10444
|
+
const linkText = {
|
10445
|
+
parameterPath: "linkText",
|
9614
10446
|
mapper: {
|
9615
|
-
serializedName: "
|
10447
|
+
serializedName: "x-ms-link-text",
|
9616
10448
|
required: true,
|
9617
|
-
xmlName: "
|
10449
|
+
xmlName: "x-ms-link-text",
|
9618
10450
|
type: {
|
9619
10451
|
name: "String"
|
9620
10452
|
}
|
9621
10453
|
}
|
9622
10454
|
};
|
9623
|
-
const
|
9624
|
-
parameterPath: "
|
10455
|
+
const restype4 = {
|
10456
|
+
parameterPath: "restype",
|
9625
10457
|
mapper: {
|
9626
|
-
defaultValue: "
|
10458
|
+
defaultValue: "hardlink",
|
9627
10459
|
isConstant: true,
|
9628
|
-
serializedName: "
|
10460
|
+
serializedName: "restype",
|
10461
|
+
type: {
|
10462
|
+
name: "String"
|
10463
|
+
}
|
10464
|
+
}
|
10465
|
+
};
|
10466
|
+
const targetFile = {
|
10467
|
+
parameterPath: "targetFile",
|
10468
|
+
mapper: {
|
10469
|
+
serializedName: "x-ms-file-target-file",
|
10470
|
+
required: true,
|
10471
|
+
xmlName: "x-ms-file-target-file",
|
9629
10472
|
type: {
|
9630
10473
|
name: "String"
|
9631
10474
|
}
|
@@ -10450,12 +11293,10 @@ class DirectoryImpl {
|
|
10450
11293
|
}
|
10451
11294
|
/**
|
10452
11295
|
* Creates a new directory under the specified share or parent directory.
|
10453
|
-
* @param fileAttributes If specified, the provided file attributes shall be set. Default value:
|
10454
|
-
* ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
|
10455
11296
|
* @param options The options parameters.
|
10456
11297
|
*/
|
10457
|
-
create(
|
10458
|
-
return this.client.sendOperationRequest({
|
11298
|
+
create(options) {
|
11299
|
+
return this.client.sendOperationRequest({ options }, createOperationSpec$1);
|
10459
11300
|
}
|
10460
11301
|
/**
|
10461
11302
|
* Returns all system properties for the specified directory, and can also be used to check the
|
@@ -10476,12 +11317,10 @@ class DirectoryImpl {
|
|
10476
11317
|
}
|
10477
11318
|
/**
|
10478
11319
|
* Sets properties on the directory.
|
10479
|
-
* @param fileAttributes If specified, the provided file attributes shall be set. Default value:
|
10480
|
-
* ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
|
10481
11320
|
* @param options The options parameters.
|
10482
11321
|
*/
|
10483
|
-
setProperties(
|
10484
|
-
return this.client.sendOperationRequest({
|
11322
|
+
setProperties(options) {
|
11323
|
+
return this.client.sendOperationRequest({ options }, setPropertiesOperationSpec);
|
10485
11324
|
}
|
10486
11325
|
/**
|
10487
11326
|
* Updates user defined metadata for the specified directory.
|
@@ -10551,7 +11390,10 @@ const createOperationSpec$1 = {
|
|
10551
11390
|
fileAttributes,
|
10552
11391
|
fileCreatedOn,
|
10553
11392
|
fileLastWriteOn,
|
10554
|
-
fileChangeOn
|
11393
|
+
fileChangeOn,
|
11394
|
+
owner,
|
11395
|
+
group,
|
11396
|
+
fileMode
|
10555
11397
|
],
|
10556
11398
|
isXML: true,
|
10557
11399
|
serializer: xmlSerializer$1
|
@@ -10635,7 +11477,10 @@ const setPropertiesOperationSpec = {
|
|
10635
11477
|
fileAttributes,
|
10636
11478
|
fileCreatedOn,
|
10637
11479
|
fileLastWriteOn,
|
10638
|
-
fileChangeOn
|
11480
|
+
fileChangeOn,
|
11481
|
+
owner,
|
11482
|
+
group,
|
11483
|
+
fileMode
|
10639
11484
|
],
|
10640
11485
|
isXML: true,
|
10641
11486
|
serializer: xmlSerializer$1
|
@@ -10824,12 +11669,10 @@ class FileImpl {
|
|
10824
11669
|
/**
|
10825
11670
|
* Creates a new file or replaces a file. Note it only initializes the file with no content.
|
10826
11671
|
* @param fileContentLength Specifies the maximum size for the file, up to 4 TB.
|
10827
|
-
* @param fileAttributes If specified, the provided file attributes shall be set. Default value:
|
10828
|
-
* ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
|
10829
11672
|
* @param options The options parameters.
|
10830
11673
|
*/
|
10831
|
-
create(fileContentLength,
|
10832
|
-
return this.client.sendOperationRequest({ fileContentLength,
|
11674
|
+
create(fileContentLength, options) {
|
11675
|
+
return this.client.sendOperationRequest({ fileContentLength, options }, createOperationSpec);
|
10833
11676
|
}
|
10834
11677
|
/**
|
10835
11678
|
* Reads or downloads a file from the system, including its metadata and properties.
|
@@ -10855,12 +11698,10 @@ class FileImpl {
|
|
10855
11698
|
}
|
10856
11699
|
/**
|
10857
11700
|
* Sets HTTP headers on the file.
|
10858
|
-
* @param fileAttributes If specified, the provided file attributes shall be set. Default value:
|
10859
|
-
* ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
|
10860
11701
|
* @param options The options parameters.
|
10861
11702
|
*/
|
10862
|
-
setHttpHeaders(
|
10863
|
-
return this.client.sendOperationRequest({
|
11703
|
+
setHttpHeaders(options) {
|
11704
|
+
return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec);
|
10864
11705
|
}
|
10865
11706
|
/**
|
10866
11707
|
* Updates user-defined metadata for the specified file.
|
@@ -10992,6 +11833,30 @@ class FileImpl {
|
|
10992
11833
|
rename(renameSource, options) {
|
10993
11834
|
return this.client.sendOperationRequest({ renameSource, options }, renameOperationSpec);
|
10994
11835
|
}
|
11836
|
+
/**
|
11837
|
+
* Creates a symbolic link.
|
11838
|
+
* @param linkText NFS only. Required. The path to the original file, the symbolic link is pointing to.
|
11839
|
+
* The path is of type string which is not resolved and is stored as is. The path can be absolute path
|
11840
|
+
* or the relative path depending on the content stored in the symbolic link file.
|
11841
|
+
* @param options The options parameters.
|
11842
|
+
*/
|
11843
|
+
createSymbolicLink(linkText, options) {
|
11844
|
+
return this.client.sendOperationRequest({ linkText, options }, createSymbolicLinkOperationSpec);
|
11845
|
+
}
|
11846
|
+
/** @param options The options parameters. */
|
11847
|
+
getSymbolicLink(options) {
|
11848
|
+
return this.client.sendOperationRequest({ options }, getSymbolicLinkOperationSpec);
|
11849
|
+
}
|
11850
|
+
/**
|
11851
|
+
* Creates a hard link.
|
11852
|
+
* @param targetFile NFS only. Required. Specifies the path of the target file to which the link will
|
11853
|
+
* be created, up to 2 KiB in length. It should be full path of the target from the root.The target
|
11854
|
+
* file must be in the same share and hence the same storage account.
|
11855
|
+
* @param options The options parameters.
|
11856
|
+
*/
|
11857
|
+
createHardLink(targetFile, options) {
|
11858
|
+
return this.client.sendOperationRequest({ targetFile, options }, createHardLinkOperationSpec);
|
11859
|
+
}
|
10995
11860
|
}
|
10996
11861
|
// Operation Specifications
|
10997
11862
|
const xmlSerializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
|
@@ -11023,6 +11888,9 @@ const createOperationSpec = {
|
|
11023
11888
|
fileCreatedOn,
|
11024
11889
|
fileLastWriteOn,
|
11025
11890
|
fileChangeOn,
|
11891
|
+
owner,
|
11892
|
+
group,
|
11893
|
+
fileMode,
|
11026
11894
|
fileContentLength,
|
11027
11895
|
fileTypeConstant,
|
11028
11896
|
fileContentType,
|
@@ -11030,7 +11898,8 @@ const createOperationSpec = {
|
|
11030
11898
|
fileContentLanguage,
|
11031
11899
|
fileCacheControl,
|
11032
11900
|
fileContentMD5,
|
11033
|
-
fileContentDisposition
|
11901
|
+
fileContentDisposition,
|
11902
|
+
nfsFileType
|
11034
11903
|
],
|
11035
11904
|
isXML: true,
|
11036
11905
|
serializer: xmlSerializer
|
@@ -11147,6 +12016,9 @@ const setHttpHeadersOperationSpec = {
|
|
11147
12016
|
fileCreatedOn,
|
11148
12017
|
fileLastWriteOn,
|
11149
12018
|
fileChangeOn,
|
12019
|
+
owner,
|
12020
|
+
group,
|
12021
|
+
fileMode,
|
11150
12022
|
fileContentType,
|
11151
12023
|
fileContentEncoding,
|
11152
12024
|
fileContentLanguage,
|
@@ -11413,6 +12285,9 @@ const startCopyOperationSpec = {
|
|
11413
12285
|
allowTrailingDot,
|
11414
12286
|
filePermission,
|
11415
12287
|
filePermissionKey1,
|
12288
|
+
owner,
|
12289
|
+
group,
|
12290
|
+
fileMode,
|
11416
12291
|
fileAttributes1,
|
11417
12292
|
fileCreationTime,
|
11418
12293
|
fileLastWriteTime,
|
@@ -11421,7 +12296,9 @@ const startCopyOperationSpec = {
|
|
11421
12296
|
copySource,
|
11422
12297
|
filePermissionCopyMode,
|
11423
12298
|
ignoreReadOnly1,
|
11424
|
-
setArchiveAttribute
|
12299
|
+
setArchiveAttribute,
|
12300
|
+
fileModeCopyMode,
|
12301
|
+
fileOwnerCopyMode
|
11425
12302
|
],
|
11426
12303
|
isXML: true,
|
11427
12304
|
serializer: xmlSerializer
|
@@ -11552,6 +12429,89 @@ const renameOperationSpec = {
|
|
11552
12429
|
isXML: true,
|
11553
12430
|
serializer: xmlSerializer
|
11554
12431
|
};
|
12432
|
+
const createSymbolicLinkOperationSpec = {
|
12433
|
+
path: "/{shareName}/{directory}/{fileName}",
|
12434
|
+
httpMethod: "PUT",
|
12435
|
+
responses: {
|
12436
|
+
201: {
|
12437
|
+
headersMapper: FileCreateSymbolicLinkHeaders
|
12438
|
+
},
|
12439
|
+
default: {
|
12440
|
+
bodyMapper: StorageError,
|
12441
|
+
headersMapper: FileCreateSymbolicLinkExceptionHeaders
|
12442
|
+
}
|
12443
|
+
},
|
12444
|
+
queryParameters: [timeoutInSeconds, restype3],
|
12445
|
+
urlParameters: [url],
|
12446
|
+
headerParameters: [
|
12447
|
+
version,
|
12448
|
+
fileRequestIntent,
|
12449
|
+
accept1,
|
12450
|
+
metadata,
|
12451
|
+
leaseId,
|
12452
|
+
requestId,
|
12453
|
+
fileCreatedOn,
|
12454
|
+
fileLastWriteOn,
|
12455
|
+
owner,
|
12456
|
+
group,
|
12457
|
+
linkText
|
12458
|
+
],
|
12459
|
+
isXML: true,
|
12460
|
+
serializer: xmlSerializer
|
12461
|
+
};
|
12462
|
+
const getSymbolicLinkOperationSpec = {
|
12463
|
+
path: "/{shareName}/{directory}/{fileName}",
|
12464
|
+
httpMethod: "GET",
|
12465
|
+
responses: {
|
12466
|
+
200: {
|
12467
|
+
headersMapper: FileGetSymbolicLinkHeaders
|
12468
|
+
},
|
12469
|
+
default: {
|
12470
|
+
bodyMapper: StorageError,
|
12471
|
+
headersMapper: FileGetSymbolicLinkExceptionHeaders
|
12472
|
+
}
|
12473
|
+
},
|
12474
|
+
queryParameters: [
|
12475
|
+
timeoutInSeconds,
|
12476
|
+
shareSnapshot,
|
12477
|
+
restype3
|
12478
|
+
],
|
12479
|
+
urlParameters: [url],
|
12480
|
+
headerParameters: [
|
12481
|
+
version,
|
12482
|
+
fileRequestIntent,
|
12483
|
+
accept1,
|
12484
|
+
requestId
|
12485
|
+
],
|
12486
|
+
isXML: true,
|
12487
|
+
serializer: xmlSerializer
|
12488
|
+
};
|
12489
|
+
const createHardLinkOperationSpec = {
|
12490
|
+
path: "/{shareName}/{directory}/{fileName}",
|
12491
|
+
httpMethod: "PUT",
|
12492
|
+
responses: {
|
12493
|
+
201: {
|
12494
|
+
headersMapper: FileCreateHardLinkHeaders
|
12495
|
+
},
|
12496
|
+
default: {
|
12497
|
+
bodyMapper: StorageError,
|
12498
|
+
headersMapper: FileCreateHardLinkExceptionHeaders
|
12499
|
+
}
|
12500
|
+
},
|
12501
|
+
queryParameters: [timeoutInSeconds, restype4],
|
12502
|
+
urlParameters: [url],
|
12503
|
+
headerParameters: [
|
12504
|
+
version,
|
12505
|
+
fileRequestIntent,
|
12506
|
+
accept1,
|
12507
|
+
leaseId,
|
12508
|
+
requestId,
|
12509
|
+
fileTypeConstant,
|
12510
|
+
targetFile
|
12511
|
+
],
|
12512
|
+
isXML: true,
|
12513
|
+
serializer: xmlSerializer
|
12514
|
+
};
|
11555
12515
|
|
11556
12516
|
/*
|
11557
12517
|
* Copyright (c) Microsoft Corporation.
|
@@ -11579,7 +12539,7 @@ let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.Exte
|
|
11579
12539
|
const defaults = {
|
11580
12540
|
requestContentType: "application/json; charset=utf-8"
|
11581
12541
|
};
|
11582
|
-
const packageDetails = `azsdk-js-azure-storage-file-share/12.
|
12542
|
+
const packageDetails = `azsdk-js-azure-storage-file-share/12.27.0-beta.1`;
|
11583
12543
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
11584
12544
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
11585
12545
|
: `${packageDetails}`;
|
@@ -11589,201 +12549,57 @@ let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.Exte
|
|
11589
12549
|
super(optionsWithDefaults);
|
11590
12550
|
// Parameter assignments
|
11591
12551
|
this.url = url;
|
11592
|
-
// Assigning values to Constant parameters
|
11593
|
-
this.version = options.version || "2025-
|
11594
|
-
this.fileRangeWriteFromUrl = options.fileRangeWriteFromUrl || "update";
|
11595
|
-
this.service = new ServiceImpl(this);
|
11596
|
-
this.share = new ShareImpl(this);
|
11597
|
-
this.directory = new DirectoryImpl(this);
|
11598
|
-
this.file = new FileImpl(this);
|
11599
|
-
}
|
11600
|
-
};
|
11601
|
-
|
11602
|
-
// Copyright (c) Microsoft Corporation.
|
11603
|
-
// Licensed under the MIT License.
|
11604
|
-
/**
|
11605
|
-
* @internal
|
11606
|
-
*/
|
11607
|
-
class StorageContextClient extends StorageClient$1 {
|
11608
|
-
async sendOperationRequest(operationArguments, operationSpec) {
|
11609
|
-
const operationSpecToSend = Object.assign({}, operationSpec);
|
11610
|
-
if (operationSpecToSend.path === "/{shareName}" ||
|
11611
|
-
operationSpecToSend.path === "/{shareName}/{directory}" ||
|
11612
|
-
operationSpecToSend.path === "/{shareName}/{directory}/{fileName}") {
|
11613
|
-
operationSpecToSend.path = "";
|
11614
|
-
}
|
11615
|
-
return super.sendOperationRequest(operationArguments, operationSpecToSend);
|
11616
|
-
}
|
11617
|
-
}
|
11618
|
-
|
11619
|
-
// Copyright (c) Microsoft Corporation.
|
11620
|
-
// Licensed under the MIT License.
|
11621
|
-
/**
|
11622
|
-
* A StorageClient represents a base client class for ServiceClient, ContainerClient and etc.
|
11623
|
-
*/
|
11624
|
-
class StorageClient {
|
11625
|
-
/**
|
11626
|
-
* Creates an instance of StorageClient.
|
11627
|
-
* @param url -
|
11628
|
-
* @param pipeline -
|
11629
|
-
*/
|
11630
|
-
constructor(url, pipeline) {
|
11631
|
-
// URL should be encoded and only once, protocol layer shouldn't encode URL again
|
11632
|
-
this.url = escapeURLPath(url);
|
11633
|
-
this.accountName = getAccountNameFromUrl(url);
|
11634
|
-
this.pipeline = pipeline;
|
11635
|
-
this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));
|
11636
|
-
// Remove the default content-type in generated code of StorageClientContext
|
11637
|
-
const storageClientContext = this.storageClientContext;
|
11638
|
-
if (storageClientContext.requestContentType) {
|
11639
|
-
storageClientContext.requestContentType = undefined;
|
11640
|
-
}
|
11641
|
-
const credential = getCredentialFromPipeline(pipeline);
|
11642
|
-
this.credential = credential;
|
11643
|
-
}
|
11644
|
-
}
|
11645
|
-
|
11646
|
-
// Copyright (c) Microsoft Corporation.
|
11647
|
-
// Licensed under the MIT License.
|
11648
|
-
/**
|
11649
|
-
* This is a helper class to construct a string representing the NTFS attributes to a file or directory.
|
11650
|
-
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-file#file-system-attributes
|
11651
|
-
*/
|
11652
|
-
class FileSystemAttributes {
|
11653
|
-
constructor() {
|
11654
|
-
/**
|
11655
|
-
* Specifies a directory or file that is read-only.
|
11656
|
-
*/
|
11657
|
-
this.readonly = false;
|
11658
|
-
/**
|
11659
|
-
* Specifies a directory or file is hidden.
|
11660
|
-
*/
|
11661
|
-
this.hidden = false;
|
11662
|
-
/**
|
11663
|
-
* Specifies a directory or file that the operating system uses a part of, or uses exclusively.
|
11664
|
-
*/
|
11665
|
-
this.system = false;
|
11666
|
-
/**
|
11667
|
-
* Specifies a directory or file that does not have other attributes set. This attribute is valid only when used alone.
|
11668
|
-
*/
|
11669
|
-
this.none = false;
|
11670
|
-
/**
|
11671
|
-
* Specifies the handle identifies a directory.
|
11672
|
-
*/
|
11673
|
-
this.directory = false;
|
11674
|
-
/**
|
11675
|
-
* Specifies a directory or file is an archive. Applications typically use this attribute to mark files for backup or removal.
|
11676
|
-
*/
|
11677
|
-
this.archive = false;
|
11678
|
-
/**
|
11679
|
-
* Specifies if a file is temporary.
|
11680
|
-
*/
|
11681
|
-
this.temporary = false;
|
11682
|
-
/**
|
11683
|
-
* Specifies the data of a directory or file is not available immediately.
|
11684
|
-
* This file system attribute is presented primarily to provide compatibility with Windows - Azure Files does not support with offline storage options.
|
11685
|
-
*/
|
11686
|
-
this.offline = false;
|
11687
|
-
/**
|
11688
|
-
* Specifies the directory or file is not to be indexed by the content indexing service.
|
11689
|
-
*/
|
11690
|
-
this.notContentIndexed = false;
|
11691
|
-
/**
|
11692
|
-
* Specifies the user data stream not to be read by the background data integrity scanner.
|
11693
|
-
* This file system attribute is presented primarily to provide compatibility with Windows.
|
11694
|
-
* Applicable to directory or file.
|
11695
|
-
*/
|
11696
|
-
this.noScrubData = false;
|
11697
|
-
}
|
11698
|
-
/**
|
11699
|
-
* Creates a FileSystemAttributes from the specified attributes string. This method will throw an
|
11700
|
-
* Error if it encounters a string that does not correspond to a valid attributes.
|
11701
|
-
*
|
11702
|
-
* @param fileAttributes - The value of header x-ms-file-attributes.
|
11703
|
-
*/
|
11704
|
-
static parse(fileAttributes) {
|
11705
|
-
if (!fileAttributes) {
|
11706
|
-
throw new RangeError(`Invalid fileAttributes: '${fileAttributes}'.`);
|
11707
|
-
}
|
11708
|
-
const fileSystemAttributes = new FileSystemAttributes();
|
11709
|
-
const attributes = fileAttributes.trim().split("|");
|
11710
|
-
for (let str of attributes) {
|
11711
|
-
str = str.trim();
|
11712
|
-
switch (str) {
|
11713
|
-
case "ReadOnly":
|
11714
|
-
fileSystemAttributes.readonly = true;
|
11715
|
-
break;
|
11716
|
-
case "Hidden":
|
11717
|
-
fileSystemAttributes.hidden = true;
|
11718
|
-
break;
|
11719
|
-
case "System":
|
11720
|
-
fileSystemAttributes.system = true;
|
11721
|
-
break;
|
11722
|
-
case "None":
|
11723
|
-
fileSystemAttributes.none = true;
|
11724
|
-
break;
|
11725
|
-
case "Temporary":
|
11726
|
-
fileSystemAttributes.temporary = true;
|
11727
|
-
break;
|
11728
|
-
case "Offline":
|
11729
|
-
fileSystemAttributes.offline = true;
|
11730
|
-
break;
|
11731
|
-
case "Directory":
|
11732
|
-
fileSystemAttributes.directory = true;
|
11733
|
-
break;
|
11734
|
-
case "Archive":
|
11735
|
-
fileSystemAttributes.archive = true;
|
11736
|
-
break;
|
11737
|
-
case "NotContentIndexed":
|
11738
|
-
fileSystemAttributes.notContentIndexed = true;
|
11739
|
-
break;
|
11740
|
-
case "NoScrubData":
|
11741
|
-
fileSystemAttributes.noScrubData = true;
|
11742
|
-
break;
|
11743
|
-
default:
|
11744
|
-
throw new RangeError(`Invalid attribute: ${str}`);
|
11745
|
-
}
|
12552
|
+
// Assigning values to Constant parameters
|
12553
|
+
this.version = options.version || "2025-05-05";
|
12554
|
+
this.fileRangeWriteFromUrl = options.fileRangeWriteFromUrl || "update";
|
12555
|
+
this.service = new ServiceImpl(this);
|
12556
|
+
this.share = new ShareImpl(this);
|
12557
|
+
this.directory = new DirectoryImpl(this);
|
12558
|
+
this.file = new FileImpl(this);
|
12559
|
+
}
|
12560
|
+
};
|
12561
|
+
|
12562
|
+
// Copyright (c) Microsoft Corporation.
|
12563
|
+
// Licensed under the MIT License.
|
12564
|
+
/**
|
12565
|
+
* @internal
|
12566
|
+
*/
|
12567
|
+
class StorageContextClient extends StorageClient$1 {
|
12568
|
+
async sendOperationRequest(operationArguments, operationSpec) {
|
12569
|
+
const operationSpecToSend = Object.assign({}, operationSpec);
|
12570
|
+
if (operationSpecToSend.path === "/{shareName}" ||
|
12571
|
+
operationSpecToSend.path === "/{shareName}/{directory}" ||
|
12572
|
+
operationSpecToSend.path === "/{shareName}/{directory}/{fileName}") {
|
12573
|
+
operationSpecToSend.path = "";
|
11746
12574
|
}
|
11747
|
-
return
|
12575
|
+
return super.sendOperationRequest(operationArguments, operationSpecToSend);
|
11748
12576
|
}
|
12577
|
+
}
|
12578
|
+
|
12579
|
+
// Copyright (c) Microsoft Corporation.
|
12580
|
+
// Licensed under the MIT License.
|
12581
|
+
/**
|
12582
|
+
* A StorageClient represents a base client class for ServiceClient, ContainerClient and etc.
|
12583
|
+
*/
|
12584
|
+
class StorageClient {
|
11749
12585
|
/**
|
11750
|
-
*
|
11751
|
-
*
|
11752
|
-
* @
|
12586
|
+
* Creates an instance of StorageClient.
|
12587
|
+
* @param url -
|
12588
|
+
* @param pipeline -
|
11753
12589
|
*/
|
11754
|
-
|
11755
|
-
|
11756
|
-
|
11757
|
-
|
11758
|
-
|
11759
|
-
|
11760
|
-
|
11761
|
-
|
11762
|
-
if (
|
11763
|
-
|
11764
|
-
}
|
11765
|
-
if (this.none) {
|
11766
|
-
attributes.push("None");
|
11767
|
-
}
|
11768
|
-
if (this.temporary) {
|
11769
|
-
attributes.push("Temporary");
|
11770
|
-
}
|
11771
|
-
if (this.directory) {
|
11772
|
-
attributes.push("Directory");
|
11773
|
-
}
|
11774
|
-
if (this.archive) {
|
11775
|
-
attributes.push("Archive");
|
11776
|
-
}
|
11777
|
-
if (this.offline) {
|
11778
|
-
attributes.push("Offline");
|
11779
|
-
}
|
11780
|
-
if (this.notContentIndexed) {
|
11781
|
-
attributes.push("NotContentIndexed");
|
11782
|
-
}
|
11783
|
-
if (this.noScrubData) {
|
11784
|
-
attributes.push("NoScrubData");
|
12590
|
+
constructor(url, pipeline) {
|
12591
|
+
// URL should be encoded and only once, protocol layer shouldn't encode URL again
|
12592
|
+
this.url = escapeURLPath(url);
|
12593
|
+
this.accountName = getAccountNameFromUrl(url);
|
12594
|
+
this.pipeline = pipeline;
|
12595
|
+
this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));
|
12596
|
+
// Remove the default content-type in generated code of StorageClientContext
|
12597
|
+
const storageClientContext = this.storageClientContext;
|
12598
|
+
if (storageClientContext.requestContentType) {
|
12599
|
+
storageClientContext.requestContentType = undefined;
|
11785
12600
|
}
|
11786
|
-
|
12601
|
+
const credential = getCredentialFromPipeline(pipeline);
|
12602
|
+
this.credential = credential;
|
11787
12603
|
}
|
11788
12604
|
}
|
11789
12605
|
|
@@ -12233,6 +13049,30 @@ class FileDownloadResponse {
|
|
12233
13049
|
get leaseStatus() {
|
12234
13050
|
return this.originalResponse.leaseStatus;
|
12235
13051
|
}
|
13052
|
+
/**
|
13053
|
+
* NFS only. The mode of the file or directory.
|
13054
|
+
*/
|
13055
|
+
get fileMode() {
|
13056
|
+
return this.originalResponse.fileMode;
|
13057
|
+
}
|
13058
|
+
/**
|
13059
|
+
* TNFS only. The owner of the file or directory.
|
13060
|
+
*/
|
13061
|
+
get owner() {
|
13062
|
+
return this.originalResponse.owner;
|
13063
|
+
}
|
13064
|
+
/**
|
13065
|
+
* NFS only. The owning group of the file or directory.
|
13066
|
+
*/
|
13067
|
+
get group() {
|
13068
|
+
return this.originalResponse.group;
|
13069
|
+
}
|
13070
|
+
/**
|
13071
|
+
* NFS only. The link count of the file or directory.
|
13072
|
+
*/
|
13073
|
+
get linkCount() {
|
13074
|
+
return this.originalResponse.linkCount;
|
13075
|
+
}
|
12236
13076
|
/**
|
12237
13077
|
* The response body as a node.js Readable stream.
|
12238
13078
|
* Always undefined in the browser.
|
@@ -12284,6 +13124,150 @@ function rangeToString(range) {
|
|
12284
13124
|
: `bytes=${range.offset}-`;
|
12285
13125
|
}
|
12286
13126
|
|
13127
|
+
// Copyright (c) Microsoft Corporation.
|
13128
|
+
// Licensed under the MIT License.
|
13129
|
+
/**
|
13130
|
+
* This is a helper class to construct a string representing the NTFS attributes to a file or directory.
|
13131
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-file#file-system-attributes
|
13132
|
+
*/
|
13133
|
+
class FileSystemAttributes {
|
13134
|
+
constructor() {
|
13135
|
+
/**
|
13136
|
+
* Specifies a directory or file that is read-only.
|
13137
|
+
*/
|
13138
|
+
this.readonly = false;
|
13139
|
+
/**
|
13140
|
+
* Specifies a directory or file is hidden.
|
13141
|
+
*/
|
13142
|
+
this.hidden = false;
|
13143
|
+
/**
|
13144
|
+
* Specifies a directory or file that the operating system uses a part of, or uses exclusively.
|
13145
|
+
*/
|
13146
|
+
this.system = false;
|
13147
|
+
/**
|
13148
|
+
* Specifies a directory or file that does not have other attributes set. This attribute is valid only when used alone.
|
13149
|
+
*/
|
13150
|
+
this.none = false;
|
13151
|
+
/**
|
13152
|
+
* Specifies the handle identifies a directory.
|
13153
|
+
*/
|
13154
|
+
this.directory = false;
|
13155
|
+
/**
|
13156
|
+
* Specifies a directory or file is an archive. Applications typically use this attribute to mark files for backup or removal.
|
13157
|
+
*/
|
13158
|
+
this.archive = false;
|
13159
|
+
/**
|
13160
|
+
* Specifies if a file is temporary.
|
13161
|
+
*/
|
13162
|
+
this.temporary = false;
|
13163
|
+
/**
|
13164
|
+
* Specifies the data of a directory or file is not available immediately.
|
13165
|
+
* This file system attribute is presented primarily to provide compatibility with Windows - Azure Files does not support with offline storage options.
|
13166
|
+
*/
|
13167
|
+
this.offline = false;
|
13168
|
+
/**
|
13169
|
+
* Specifies the directory or file is not to be indexed by the content indexing service.
|
13170
|
+
*/
|
13171
|
+
this.notContentIndexed = false;
|
13172
|
+
/**
|
13173
|
+
* Specifies the user data stream not to be read by the background data integrity scanner.
|
13174
|
+
* This file system attribute is presented primarily to provide compatibility with Windows.
|
13175
|
+
* Applicable to directory or file.
|
13176
|
+
*/
|
13177
|
+
this.noScrubData = false;
|
13178
|
+
}
|
13179
|
+
/**
|
13180
|
+
* Creates a FileSystemAttributes from the specified attributes string. This method will throw an
|
13181
|
+
* Error if it encounters a string that does not correspond to a valid attributes.
|
13182
|
+
*
|
13183
|
+
* @param fileAttributes - The value of header x-ms-file-attributes.
|
13184
|
+
*/
|
13185
|
+
static parse(fileAttributes) {
|
13186
|
+
if (!fileAttributes) {
|
13187
|
+
throw new RangeError(`Invalid fileAttributes: '${fileAttributes}'.`);
|
13188
|
+
}
|
13189
|
+
const fileSystemAttributes = new FileSystemAttributes();
|
13190
|
+
const attributes = fileAttributes.trim().split("|");
|
13191
|
+
for (let str of attributes) {
|
13192
|
+
str = str.trim();
|
13193
|
+
switch (str) {
|
13194
|
+
case "ReadOnly":
|
13195
|
+
fileSystemAttributes.readonly = true;
|
13196
|
+
break;
|
13197
|
+
case "Hidden":
|
13198
|
+
fileSystemAttributes.hidden = true;
|
13199
|
+
break;
|
13200
|
+
case "System":
|
13201
|
+
fileSystemAttributes.system = true;
|
13202
|
+
break;
|
13203
|
+
case "None":
|
13204
|
+
fileSystemAttributes.none = true;
|
13205
|
+
break;
|
13206
|
+
case "Temporary":
|
13207
|
+
fileSystemAttributes.temporary = true;
|
13208
|
+
break;
|
13209
|
+
case "Offline":
|
13210
|
+
fileSystemAttributes.offline = true;
|
13211
|
+
break;
|
13212
|
+
case "Directory":
|
13213
|
+
fileSystemAttributes.directory = true;
|
13214
|
+
break;
|
13215
|
+
case "Archive":
|
13216
|
+
fileSystemAttributes.archive = true;
|
13217
|
+
break;
|
13218
|
+
case "NotContentIndexed":
|
13219
|
+
fileSystemAttributes.notContentIndexed = true;
|
13220
|
+
break;
|
13221
|
+
case "NoScrubData":
|
13222
|
+
fileSystemAttributes.noScrubData = true;
|
13223
|
+
break;
|
13224
|
+
default:
|
13225
|
+
throw new RangeError(`Invalid attribute: ${str}`);
|
13226
|
+
}
|
13227
|
+
}
|
13228
|
+
return fileSystemAttributes;
|
13229
|
+
}
|
13230
|
+
/**
|
13231
|
+
* Converts the given attributes to a string.
|
13232
|
+
*
|
13233
|
+
* @returns A string which represents the FileSystemAttributes
|
13234
|
+
*/
|
13235
|
+
toString() {
|
13236
|
+
const attributes = [];
|
13237
|
+
if (this.readonly) {
|
13238
|
+
attributes.push("ReadOnly");
|
13239
|
+
}
|
13240
|
+
if (this.hidden) {
|
13241
|
+
attributes.push("Hidden");
|
13242
|
+
}
|
13243
|
+
if (this.system) {
|
13244
|
+
attributes.push("System");
|
13245
|
+
}
|
13246
|
+
if (this.none) {
|
13247
|
+
attributes.push("None");
|
13248
|
+
}
|
13249
|
+
if (this.temporary) {
|
13250
|
+
attributes.push("Temporary");
|
13251
|
+
}
|
13252
|
+
if (this.directory) {
|
13253
|
+
attributes.push("Directory");
|
13254
|
+
}
|
13255
|
+
if (this.archive) {
|
13256
|
+
attributes.push("Archive");
|
13257
|
+
}
|
13258
|
+
if (this.offline) {
|
13259
|
+
attributes.push("Offline");
|
13260
|
+
}
|
13261
|
+
if (this.notContentIndexed) {
|
13262
|
+
attributes.push("NotContentIndexed");
|
13263
|
+
}
|
13264
|
+
if (this.noScrubData) {
|
13265
|
+
attributes.push("NoScrubData");
|
13266
|
+
}
|
13267
|
+
return attributes.join("|");
|
13268
|
+
}
|
13269
|
+
}
|
13270
|
+
|
12287
13271
|
// Copyright (c) Microsoft Corporation.
|
12288
13272
|
// Licensed under the MIT License.
|
12289
13273
|
/**
|
@@ -12334,15 +13318,6 @@ function validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions(options) {
|
|
12334
13318
|
options = {};
|
12335
13319
|
}
|
12336
13320
|
validateFilePermissionOptions(options.filePermission, options.filePermissionKey);
|
12337
|
-
if (!options.creationTime) {
|
12338
|
-
options.creationTime = "now";
|
12339
|
-
}
|
12340
|
-
if (!options.lastWriteTime) {
|
12341
|
-
options.lastWriteTime = "now";
|
12342
|
-
}
|
12343
|
-
if (!options.filePermission && !options.filePermissionKey) {
|
12344
|
-
options.filePermission = "inherit";
|
12345
|
-
}
|
12346
13321
|
return options;
|
12347
13322
|
}
|
12348
13323
|
function validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(options) {
|
@@ -12351,18 +13326,6 @@ function validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(opt
|
|
12351
13326
|
options = {};
|
12352
13327
|
}
|
12353
13328
|
validateFilePermissionOptions(options.filePermission, options.filePermissionKey);
|
12354
|
-
if (!options.creationTime) {
|
12355
|
-
options.creationTime = "preserve";
|
12356
|
-
}
|
12357
|
-
if (!options.lastWriteTime) {
|
12358
|
-
options.lastWriteTime = "preserve";
|
12359
|
-
}
|
12360
|
-
if (!options.fileAttributes) {
|
12361
|
-
options.fileAttributes = "preserve";
|
12362
|
-
}
|
12363
|
-
if (!options.filePermission && !options.filePermissionKey) {
|
12364
|
-
options.filePermission = "preserve";
|
12365
|
-
}
|
12366
13329
|
return options;
|
12367
13330
|
}
|
12368
13331
|
function fileAttributesToString(fileAttributes) {
|
@@ -12935,7 +13898,7 @@ class ShareClient extends StorageClient {
|
|
12935
13898
|
/**
|
12936
13899
|
* Creates a new share under the specified account. If the share with
|
12937
13900
|
* the same name already exists, the operation fails.
|
12938
|
-
* @see https://
|
13901
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-share
|
12939
13902
|
*
|
12940
13903
|
* @param options - Options to Share Create operation.
|
12941
13904
|
* @returns Response data for the Share Create operation.
|
@@ -12948,7 +13911,7 @@ class ShareClient extends StorageClient {
|
|
12948
13911
|
/**
|
12949
13912
|
* Creates a new share under the specified account. If the share with
|
12950
13913
|
* the same name already exists, it is not changed.
|
12951
|
-
* @see https://
|
13914
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-share
|
12952
13915
|
*
|
12953
13916
|
* @param options -
|
12954
13917
|
*/
|
@@ -12991,7 +13954,7 @@ class ShareClient extends StorageClient {
|
|
12991
13954
|
}
|
12992
13955
|
/**
|
12993
13956
|
* Creates a new subdirectory under this share.
|
12994
|
-
* @see https://
|
13957
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory
|
12995
13958
|
*
|
12996
13959
|
* @param directoryName -
|
12997
13960
|
* @param options - Options to Directory Create operation.
|
@@ -13010,7 +13973,7 @@ class ShareClient extends StorageClient {
|
|
13010
13973
|
/**
|
13011
13974
|
* Removes the specified empty sub directory under this share.
|
13012
13975
|
* Note that the directory must be empty before it can be deleted.
|
13013
|
-
* @see https://
|
13976
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-directory
|
13014
13977
|
*
|
13015
13978
|
* @param directoryName -
|
13016
13979
|
* @param options - Options to Directory Delete operation.
|
@@ -13025,7 +13988,7 @@ class ShareClient extends StorageClient {
|
|
13025
13988
|
/**
|
13026
13989
|
* Creates a new file or replaces a file under the root directory of this share.
|
13027
13990
|
* Note it only initializes the file with no content.
|
13028
|
-
* @see https://
|
13991
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-file
|
13029
13992
|
*
|
13030
13993
|
* @param fileName -
|
13031
13994
|
* @param size - Specifies the maximum size in bytes for the file, up to 4 TB.
|
@@ -13056,7 +14019,7 @@ class ShareClient extends StorageClient {
|
|
13056
14019
|
* a share. An attempt to perform this operation on a share snapshot will fail with 400
|
13057
14020
|
* (`InvalidQueryParameterValue`)
|
13058
14021
|
*
|
13059
|
-
* @see https://
|
14022
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-file2
|
13060
14023
|
*
|
13061
14024
|
* @param directoryName -
|
13062
14025
|
* @param fileName -
|
@@ -13096,7 +14059,7 @@ class ShareClient extends StorageClient {
|
|
13096
14059
|
/**
|
13097
14060
|
* Returns all user-defined metadata and system properties for the specified
|
13098
14061
|
* share.
|
13099
|
-
* @see https://
|
14062
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-share-properties
|
13100
14063
|
*
|
13101
14064
|
* WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
|
13102
14065
|
* they originally contained uppercase characters. This differs from the metadata keys returned by
|
@@ -13114,7 +14077,7 @@ class ShareClient extends StorageClient {
|
|
13114
14077
|
/**
|
13115
14078
|
* Marks the specified share for deletion. The share and any directories or files
|
13116
14079
|
* contained within it are later deleted during garbage collection.
|
13117
|
-
* @see https://
|
14080
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-share
|
13118
14081
|
*
|
13119
14082
|
* @param options - Options to Share Delete operation.
|
13120
14083
|
* @returns Response data for the Share Delete operation.
|
@@ -13127,7 +14090,7 @@ class ShareClient extends StorageClient {
|
|
13127
14090
|
/**
|
13128
14091
|
* Marks the specified share for deletion if it exists. The share and any directories or files
|
13129
14092
|
* contained within it are later deleted during garbage collection.
|
13130
|
-
* @see https://
|
14093
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-share
|
13131
14094
|
*
|
13132
14095
|
* @param options -
|
13133
14096
|
*/
|
@@ -13151,7 +14114,7 @@ class ShareClient extends StorageClient {
|
|
13151
14114
|
*
|
13152
14115
|
* If no option provided, or no metadata defined in the option parameter, the share
|
13153
14116
|
* metadata will be removed.
|
13154
|
-
* @see https://
|
14117
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-share-metadata
|
13155
14118
|
*
|
13156
14119
|
* @param metadata - If no metadata provided, all existing directory metadata will be removed.
|
13157
14120
|
* @param option - Options to Share Set Metadata operation.
|
@@ -13169,7 +14132,7 @@ class ShareClient extends StorageClient {
|
|
13169
14132
|
* WARNING: JavaScript Date will potential lost precision when parsing start and expiry string.
|
13170
14133
|
* For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z".
|
13171
14134
|
*
|
13172
|
-
* @see https://
|
14135
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-share-acl
|
13173
14136
|
*
|
13174
14137
|
* @param option - Options to Share Get Access Policy operation.
|
13175
14138
|
* @returns Response data for the Share Get Access Policy operation.
|
@@ -13218,7 +14181,7 @@ class ShareClient extends StorageClient {
|
|
13218
14181
|
* When you establish a stored access policy on a share, it may take up to 30 seconds to take effect.
|
13219
14182
|
* During this interval, a shared access signature that is associated with the stored access policy will
|
13220
14183
|
* fail with status code 403 (Forbidden), until the access policy becomes active.
|
13221
|
-
* @see https://
|
14184
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-share-acl
|
13222
14185
|
*
|
13223
14186
|
* @param shareAcl - Array of signed identifiers, each having a unique Id and details of access policy.
|
13224
14187
|
* @param option - Options to Share Set Access Policy operation.
|
@@ -13297,7 +14260,7 @@ class ShareClient extends StorageClient {
|
|
13297
14260
|
/**
|
13298
14261
|
* Creates a file permission (a security descriptor) at the share level.
|
13299
14262
|
* The created security descriptor can be used for the files/directories in the share.
|
13300
|
-
* @see https://
|
14263
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-permission
|
13301
14264
|
*
|
13302
14265
|
* @param options - Options to Share Create Permission operation.
|
13303
14266
|
* @param filePermission - File permission described in the SDDL
|
@@ -13310,7 +14273,7 @@ class ShareClient extends StorageClient {
|
|
13310
14273
|
/**
|
13311
14274
|
* Gets the Security Descriptor Definition Language (SDDL) for a given file permission key
|
13312
14275
|
* which indicates a security descriptor.
|
13313
|
-
* @see https://
|
14276
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-permission
|
13314
14277
|
*
|
13315
14278
|
* @param options - Options to Share Create Permission operation.
|
13316
14279
|
* @param filePermissionKey - File permission key which indicates the security descriptor of the permission.
|
@@ -13335,7 +14298,7 @@ class ShareClient extends StorageClient {
|
|
13335
14298
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
13336
14299
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
13337
14300
|
*
|
13338
|
-
* @see https://
|
14301
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
13339
14302
|
*
|
13340
14303
|
* @param options - Optional parameters.
|
13341
14304
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
@@ -13353,7 +14316,7 @@ class ShareClient extends StorageClient {
|
|
13353
14316
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
13354
14317
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
13355
14318
|
*
|
13356
|
-
* @see https://
|
14319
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
13357
14320
|
*
|
13358
14321
|
* @param options - Optional parameters.
|
13359
14322
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
@@ -13415,7 +14378,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13415
14378
|
}
|
13416
14379
|
/**
|
13417
14380
|
* Creates a new directory under the specified share or parent directory.
|
13418
|
-
* @see https://
|
14381
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory
|
13419
14382
|
*
|
13420
14383
|
* @param options - Options to Directory Create operation.
|
13421
14384
|
* @returns Response data for the Directory operation.
|
@@ -13423,21 +14386,20 @@ class ShareDirectoryClient extends StorageClient {
|
|
13423
14386
|
async create(options = {}) {
|
13424
14387
|
if (!options.fileAttributes) {
|
13425
14388
|
options = validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions(options);
|
13426
|
-
// By default set it as a directory.
|
13427
|
-
const attributes = new FileSystemAttributes();
|
13428
|
-
attributes.directory = true;
|
13429
|
-
options.fileAttributes = attributes;
|
13430
14389
|
}
|
13431
14390
|
return tracingClient.withSpan("ShareDirectoryClient-create", options, async (updatedOptions) => {
|
13432
|
-
|
13433
|
-
|
13434
|
-
|
14391
|
+
var _a, _b, _c;
|
14392
|
+
const rawResponse = await this.context.create(Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime), fileAttributes: updatedOptions.fileAttributes
|
14393
|
+
? fileAttributesToString(updatedOptions.fileAttributes)
|
14394
|
+
: undefined, owner: (_a = updatedOptions.posixProperties) === null || _a === void 0 ? void 0 : _a.owner, group: (_b = updatedOptions.posixProperties) === null || _b === void 0 ? void 0 : _b.group, fileMode: toOctalFileMode((_c = updatedOptions.posixProperties) === null || _c === void 0 ? void 0 : _c.fileMode) }), this.shareClientConfig));
|
14395
|
+
const wrappedRes = Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) });
|
14396
|
+
return assertResponse(wrappedRes);
|
13435
14397
|
});
|
13436
14398
|
}
|
13437
14399
|
/**
|
13438
14400
|
* Creates a new directory under the specified share or parent directory if it does not already exists.
|
13439
14401
|
* If the directory already exists, it is not modified.
|
13440
|
-
* @see https://
|
14402
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory
|
13441
14403
|
*
|
13442
14404
|
* @param options -
|
13443
14405
|
*/
|
@@ -13458,7 +14420,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13458
14420
|
}
|
13459
14421
|
/**
|
13460
14422
|
* Sets properties on the directory.
|
13461
|
-
* @see https://
|
14423
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-directory-properties
|
13462
14424
|
*
|
13463
14425
|
* @param DirectoryProperties - Directory properties. If no values are provided,
|
13464
14426
|
* existing values will be preserved.
|
@@ -13466,9 +14428,11 @@ class ShareDirectoryClient extends StorageClient {
|
|
13466
14428
|
async setProperties(properties = {}) {
|
13467
14429
|
properties = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(properties);
|
13468
14430
|
return tracingClient.withSpan("ShareDirectoryClient-setProperties", properties, async (updatedOptions) => {
|
13469
|
-
|
13470
|
-
|
13471
|
-
|
14431
|
+
var _a, _b, _c;
|
14432
|
+
const rawResponse = await this.context.setProperties(Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime), fileAttributes: updatedOptions.fileAttributes
|
14433
|
+
? fileAttributesToString(updatedOptions.fileAttributes)
|
14434
|
+
: undefined, owner: (_a = updatedOptions.posixProperties) === null || _a === void 0 ? void 0 : _a.owner, group: (_b = updatedOptions.posixProperties) === null || _b === void 0 ? void 0 : _b.group, fileMode: toOctalFileMode((_c = updatedOptions.posixProperties) === null || _c === void 0 ? void 0 : _c.fileMode) }), this.shareClientConfig));
|
14435
|
+
return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
|
13472
14436
|
});
|
13473
14437
|
}
|
13474
14438
|
/**
|
@@ -13490,7 +14454,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13490
14454
|
}
|
13491
14455
|
/**
|
13492
14456
|
* Creates a new subdirectory under this directory.
|
13493
|
-
* @see https://
|
14457
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory
|
13494
14458
|
*
|
13495
14459
|
* @param directoryName -
|
13496
14460
|
* @param options - Options to Directory Create operation.
|
@@ -13509,7 +14473,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13509
14473
|
/**
|
13510
14474
|
* Removes the specified empty sub directory under this directory.
|
13511
14475
|
* Note that the directory must be empty before it can be deleted.
|
13512
|
-
* @see https://
|
14476
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-directory
|
13513
14477
|
*
|
13514
14478
|
* @param directoryName -
|
13515
14479
|
* @param options - Options to Directory Delete operation.
|
@@ -13523,7 +14487,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13523
14487
|
}
|
13524
14488
|
/**
|
13525
14489
|
* Creates a new file or replaces a file under this directory. Note it only initializes the file with no content.
|
13526
|
-
* @see https://
|
14490
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-file
|
13527
14491
|
*
|
13528
14492
|
* @param fileName -
|
13529
14493
|
* @param size - Specifies the maximum size in bytes for the file, up to 4 TB.
|
@@ -13552,7 +14516,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13552
14516
|
* Delete File is not supported on a share snapshot, which is a read-only copy of
|
13553
14517
|
* a share. An attempt to perform this operation on a share snapshot will fail with 400 (InvalidQueryParameterValue)
|
13554
14518
|
*
|
13555
|
-
* @see https://
|
14519
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-file2
|
13556
14520
|
*
|
13557
14521
|
* @param fileName - Name of the file to delete
|
13558
14522
|
* @param options - Options to File Delete operation.
|
@@ -13616,20 +14580,21 @@ class ShareDirectoryClient extends StorageClient {
|
|
13616
14580
|
* Returns all system properties for the specified directory, and can also be used to check the
|
13617
14581
|
* existence of a directory. The data returned does not include the files in the directory or any
|
13618
14582
|
* subdirectories.
|
13619
|
-
* @see https://
|
14583
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-directory-properties
|
13620
14584
|
*
|
13621
14585
|
* @param options - Options to Directory Get Properties operation.
|
13622
14586
|
* @returns Response data for the Directory Get Properties operation.
|
13623
14587
|
*/
|
13624
14588
|
async getProperties(options = {}) {
|
13625
14589
|
return tracingClient.withSpan("ShareDirectoryClient-getProperties", options, async (updatedOptions) => {
|
13626
|
-
|
14590
|
+
const rawResponse = await this.context.getProperties(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig));
|
14591
|
+
return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
|
13627
14592
|
});
|
13628
14593
|
}
|
13629
14594
|
/**
|
13630
14595
|
* Removes the specified empty directory. Note that the directory must be empty before it can be
|
13631
14596
|
* deleted.
|
13632
|
-
* @see https://
|
14597
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-directory
|
13633
14598
|
*
|
13634
14599
|
* @param options - Options to Directory Delete operation.
|
13635
14600
|
* @returns Response data for the Directory Delete operation.
|
@@ -13642,7 +14607,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13642
14607
|
/**
|
13643
14608
|
* Removes the specified empty directory if it exists. Note that the directory must be empty before it can be
|
13644
14609
|
* deleted.
|
13645
|
-
* @see https://
|
14610
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-directory
|
13646
14611
|
*
|
13647
14612
|
* @param options -
|
13648
14613
|
*/
|
@@ -13664,7 +14629,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13664
14629
|
}
|
13665
14630
|
/**
|
13666
14631
|
* Updates user defined metadata for the specified directory.
|
13667
|
-
* @see https://
|
14632
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-directory-metadata
|
13668
14633
|
*
|
13669
14634
|
* @param metadata - If no metadata provided, all existing directory metadata will be removed
|
13670
14635
|
* @param options - Options to Directory Set Metadata operation.
|
@@ -13868,7 +14833,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
13868
14833
|
/**
|
13869
14834
|
* Returns a list of files or directories under the specified share or directory. It lists the
|
13870
14835
|
* contents only for a single level of the directory hierarchy.
|
13871
|
-
* @see https://
|
14836
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-directories-and-files
|
13872
14837
|
*
|
13873
14838
|
* @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
|
13874
14839
|
* @param options - Options to Directory List Files and Directories Segment operation.
|
@@ -14038,7 +15003,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
14038
15003
|
}
|
14039
15004
|
/**
|
14040
15005
|
* Lists handles for a directory.
|
14041
|
-
* @see https://
|
15006
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-handles
|
14042
15007
|
*
|
14043
15008
|
* @param marker - Optional. A string value that identifies the portion of the list to be
|
14044
15009
|
* returned with the next list handles operation. The operation returns a
|
@@ -14062,7 +15027,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
14062
15027
|
}
|
14063
15028
|
/**
|
14064
15029
|
* Force close all handles for a directory.
|
14065
|
-
* @see https://
|
15030
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
|
14066
15031
|
*
|
14067
15032
|
* @param marker - Optional. A string value that identifies the position of handles that will
|
14068
15033
|
* be closed with the next force close handles operation.
|
@@ -14083,7 +15048,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
14083
15048
|
}
|
14084
15049
|
/**
|
14085
15050
|
* Force close all handles for a directory.
|
14086
|
-
* @see https://
|
15051
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
|
14087
15052
|
*
|
14088
15053
|
* @param options -
|
14089
15054
|
*/
|
@@ -14110,7 +15075,7 @@ class ShareDirectoryClient extends StorageClient {
|
|
14110
15075
|
}
|
14111
15076
|
/**
|
14112
15077
|
* Force close a specific handle for a directory.
|
14113
|
-
* @see https://
|
15078
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
|
14114
15079
|
*
|
14115
15080
|
* @param aborter - Create a new Aborter instance with Aborter.none or Aborter.timeout(),
|
14116
15081
|
* goto documents of Aborter for more examples about request cancellation
|
@@ -14241,7 +15206,7 @@ class ShareFileClient extends StorageClient {
|
|
14241
15206
|
}
|
14242
15207
|
/**
|
14243
15208
|
* Creates a new file or replaces a file. Note it only initializes the file with no content.
|
14244
|
-
* @see https://
|
15209
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-file
|
14245
15210
|
*
|
14246
15211
|
* @param size - Specifies the maximum size in bytes for the file, up to 4 TB.
|
14247
15212
|
* @param options - Options to File Create operation.
|
@@ -14268,9 +15233,12 @@ class ShareFileClient extends StorageClient {
|
|
14268
15233
|
options = validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions(options);
|
14269
15234
|
options.fileHttpHeaders = options.fileHttpHeaders || {};
|
14270
15235
|
return tracingClient.withSpan("ShareFileClient-create", options, async (updatedOptions) => {
|
14271
|
-
|
14272
|
-
|
14273
|
-
|
15236
|
+
var _a, _b, _c, _d;
|
15237
|
+
const rawResponse = await this.context.create(size, Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime), fileAttributes: updatedOptions.fileAttributes
|
15238
|
+
? fileAttributesToString(updatedOptions.fileAttributes)
|
15239
|
+
: undefined, owner: (_a = updatedOptions.posixProperties) === null || _a === void 0 ? void 0 : _a.owner, group: (_b = updatedOptions.posixProperties) === null || _b === void 0 ? void 0 : _b.group, fileMode: toOctalFileMode((_c = updatedOptions.posixProperties) === null || _c === void 0 ? void 0 : _c.fileMode), nfsFileType: (_d = updatedOptions.posixProperties) === null || _d === void 0 ? void 0 : _d.fileType }), this.shareClientConfig));
|
15240
|
+
const wrappedRes = Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) });
|
15241
|
+
return assertResponse(wrappedRes);
|
14274
15242
|
});
|
14275
15243
|
}
|
14276
15244
|
/**
|
@@ -14279,7 +15247,7 @@ class ShareFileClient extends StorageClient {
|
|
14279
15247
|
* * In Node.js, data returns in a Readable stream `readableStreamBody`
|
14280
15248
|
* * In browsers, data returns in a promise `contentAsBlob`
|
14281
15249
|
*
|
14282
|
-
* @see https://
|
15250
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-file
|
14283
15251
|
*
|
14284
15252
|
* @param offset - From which position of the file to download, greater than or equal to 0
|
14285
15253
|
* @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
|
@@ -14340,9 +15308,10 @@ class ShareFileClient extends StorageClient {
|
|
14340
15308
|
throw new RangeError(`rangeGetContentMD5 only works with partial data downloading`);
|
14341
15309
|
}
|
14342
15310
|
const downloadFullFile = offset === 0 && !count;
|
14343
|
-
const
|
15311
|
+
const rawResponse = await this.context.download(Object.assign(Object.assign(Object.assign({}, updatedOptions), { requestOptions: {
|
14344
15312
|
onDownloadProgress: coreUtil.isNode ? undefined : updatedOptions.onProgress, // for Node.js, progress is reported by RetriableReadableStream
|
14345
|
-
}, range: downloadFullFile ? undefined : rangeToString({ offset, count }) }), this.shareClientConfig))
|
15313
|
+
}, range: downloadFullFile ? undefined : rangeToString({ offset, count }) }), this.shareClientConfig));
|
15314
|
+
const res = assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
|
14346
15315
|
// Return browser response immediately
|
14347
15316
|
if (!coreUtil.isNode) {
|
14348
15317
|
return res;
|
@@ -14409,19 +15378,20 @@ class ShareFileClient extends StorageClient {
|
|
14409
15378
|
/**
|
14410
15379
|
* Returns all user-defined metadata, standard HTTP properties, and system properties
|
14411
15380
|
* for the file. It does not return the content of the file.
|
14412
|
-
* @see https://
|
15381
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-file-properties
|
14413
15382
|
*
|
14414
15383
|
* @param options - Options to File Get Properties operation.
|
14415
15384
|
* @returns Response data for the File Get Properties operation.
|
14416
15385
|
*/
|
14417
15386
|
async getProperties(options = {}) {
|
14418
15387
|
return tracingClient.withSpan("ShareFileClient-getProperties", options, async (updatedOptions) => {
|
14419
|
-
|
15388
|
+
const rawResponse = await this.context.getProperties(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig));
|
15389
|
+
return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
|
14420
15390
|
});
|
14421
15391
|
}
|
14422
15392
|
/**
|
14423
15393
|
* Sets properties on the file.
|
14424
|
-
* @see https://
|
15394
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-properties
|
14425
15395
|
*
|
14426
15396
|
* @param properties - File properties. For file HTTP headers(e.g. Content-Type),
|
14427
15397
|
* if no values are provided, existing HTTP headers will be removed.
|
@@ -14432,9 +15402,11 @@ class ShareFileClient extends StorageClient {
|
|
14432
15402
|
properties = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(properties);
|
14433
15403
|
properties.fileHttpHeaders = properties.fileHttpHeaders || {};
|
14434
15404
|
return tracingClient.withSpan("ShareFileClient-setProperties", properties, async (updatedOptions) => {
|
14435
|
-
|
14436
|
-
|
14437
|
-
|
15405
|
+
var _a, _b, _c;
|
15406
|
+
const rawResponse = await this.context.setHttpHeaders(Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime), fileAttributes: updatedOptions.fileAttributes
|
15407
|
+
? fileAttributesToString(updatedOptions.fileAttributes)
|
15408
|
+
: undefined, owner: (_a = updatedOptions.posixProperties) === null || _a === void 0 ? void 0 : _a.owner, group: (_b = updatedOptions.posixProperties) === null || _b === void 0 ? void 0 : _b.group, fileMode: toOctalFileMode((_c = updatedOptions.posixProperties) === null || _c === void 0 ? void 0 : _c.fileMode) }), this.shareClientConfig));
|
15409
|
+
return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
|
14438
15410
|
});
|
14439
15411
|
}
|
14440
15412
|
/**
|
@@ -14449,7 +15421,7 @@ class ShareFileClient extends StorageClient {
|
|
14449
15421
|
* Delete File is not supported on a share snapshot, which is a read-only copy of
|
14450
15422
|
* a share. An attempt to perform this operation on a share snapshot will fail with 400 (InvalidQueryParameterValue)
|
14451
15423
|
*
|
14452
|
-
* @see https://
|
15424
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-file2
|
14453
15425
|
*
|
14454
15426
|
* @param options - Options to File Delete operation.
|
14455
15427
|
* @returns Response data for the File Delete operation.
|
@@ -14471,7 +15443,7 @@ class ShareFileClient extends StorageClient {
|
|
14471
15443
|
* Delete File is not supported on a share snapshot, which is a read-only copy of
|
14472
15444
|
* a share. An attempt to perform this operation on a share snapshot will fail with 400 (InvalidQueryParameterValue)
|
14473
15445
|
*
|
14474
|
-
* @see https://
|
15446
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-file2
|
14475
15447
|
*
|
14476
15448
|
* @param options -
|
14477
15449
|
*/
|
@@ -14496,7 +15468,7 @@ class ShareFileClient extends StorageClient {
|
|
14496
15468
|
*
|
14497
15469
|
* If no option provided, or no value provided for the file HTTP headers in the options,
|
14498
15470
|
* these file HTTP headers without a value will be cleared.
|
14499
|
-
* @see https://
|
15471
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-properties
|
14500
15472
|
*
|
14501
15473
|
* @param FileHttpHeaders - File HTTP headers like Content-Type.
|
14502
15474
|
* Provide undefined will remove existing HTTP headers.
|
@@ -14507,15 +15479,17 @@ class ShareFileClient extends StorageClient {
|
|
14507
15479
|
// FileAttributes, filePermission, createTime, lastWriteTime will all be preserved
|
14508
15480
|
options = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(options);
|
14509
15481
|
return tracingClient.withSpan("ShareFileClient-setHTTPHeaders", options, async (updatedOptions) => {
|
14510
|
-
|
14511
|
-
|
14512
|
-
|
15482
|
+
var _a, _b, _c;
|
15483
|
+
const rawResponse = await this.context.setHttpHeaders(Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileHttpHeaders, fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime), fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileAttributes: updatedOptions.fileAttributes
|
15484
|
+
? fileAttributesToString(updatedOptions.fileAttributes)
|
15485
|
+
: undefined, owner: (_a = updatedOptions.posixProperties) === null || _a === void 0 ? void 0 : _a.owner, group: (_b = updatedOptions.posixProperties) === null || _b === void 0 ? void 0 : _b.group, fileMode: toOctalFileMode((_c = updatedOptions.posixProperties) === null || _c === void 0 ? void 0 : _c.fileMode) }), this.shareClientConfig));
|
15486
|
+
return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
|
14513
15487
|
});
|
14514
15488
|
}
|
14515
15489
|
/**
|
14516
15490
|
* Resize file.
|
14517
15491
|
*
|
14518
|
-
* @see https://
|
15492
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-properties
|
14519
15493
|
*
|
14520
15494
|
* @param length - Resizes a file to the specified size in bytes.
|
14521
15495
|
* If the specified byte value is less than the current size of the file,
|
@@ -14530,7 +15504,9 @@ class ShareFileClient extends StorageClient {
|
|
14530
15504
|
// FileAttributes, filePermission, createTime, lastWriteTime will all be preserved.
|
14531
15505
|
options = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(options);
|
14532
15506
|
return tracingClient.withSpan("ShareFileClient-resize", options, async (updatedOptions) => {
|
14533
|
-
|
15507
|
+
var _a, _b, _c;
|
15508
|
+
const rawResponse = await this.context.setHttpHeaders(Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileContentLength: length, fileChangeOn: fileChangeTimeToString(options.changeTime), fileCreatedOn: fileCreationTimeToString(options.creationTime), fileLastWriteOn: fileLastWriteTimeToString(options.lastWriteTime), fileAttributes: fileAttributesToString(updatedOptions.fileAttributes), owner: (_a = updatedOptions.posixProperties) === null || _a === void 0 ? void 0 : _a.owner, group: (_b = updatedOptions.posixProperties) === null || _b === void 0 ? void 0 : _b.group, fileMode: toOctalFileMode((_c = options.posixProperties) === null || _c === void 0 ? void 0 : _c.fileMode) }), this.shareClientConfig));
|
15509
|
+
return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
|
14534
15510
|
});
|
14535
15511
|
}
|
14536
15512
|
/**
|
@@ -14538,7 +15514,7 @@ class ShareFileClient extends StorageClient {
|
|
14538
15514
|
*
|
14539
15515
|
* If no metadata defined in the option parameter, the file
|
14540
15516
|
* metadata will be removed.
|
14541
|
-
* @see https://
|
15517
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-metadata
|
14542
15518
|
*
|
14543
15519
|
* @param metadata - If no metadata provided, all existing directory metadata will be removed
|
14544
15520
|
* @param options - Options to File Set Metadata operation.
|
@@ -14669,13 +15645,14 @@ class ShareFileClient extends StorageClient {
|
|
14669
15645
|
*/
|
14670
15646
|
async startCopyFromURL(copySource, options = {}) {
|
14671
15647
|
return tracingClient.withSpan("ShareFileClient-startCopyFromURL", options, async (updatedOptions) => {
|
14672
|
-
|
15648
|
+
var _a, _b, _c;
|
15649
|
+
return assertResponse(await this.context.startCopy(copySource, Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { owner: (_a = updatedOptions.posixProperties) === null || _a === void 0 ? void 0 : _a.owner, group: (_b = updatedOptions.posixProperties) === null || _b === void 0 ? void 0 : _b.group, fileMode: toOctalFileMode((_c = updatedOptions.posixProperties) === null || _c === void 0 ? void 0 : _c.fileMode), fileModeCopyMode: updatedOptions.fileModeCopyMode, fileOwnerCopyMode: updatedOptions.fileOwnerCopyMode })));
|
14673
15650
|
});
|
14674
15651
|
}
|
14675
15652
|
/**
|
14676
15653
|
* Aborts a pending Copy File operation, and leaves a destination file with zero length and full
|
14677
15654
|
* metadata.
|
14678
|
-
* @see https://
|
15655
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/abort-copy-file
|
14679
15656
|
*
|
14680
15657
|
* @param copyId - Id of the Copy File operation to abort.
|
14681
15658
|
* @param options - Options to File Abort Copy From URL operation.
|
@@ -15008,7 +15985,7 @@ class ShareFileClient extends StorageClient {
|
|
15008
15985
|
}
|
15009
15986
|
/**
|
15010
15987
|
* Lists handles for a file.
|
15011
|
-
* @see https://
|
15988
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-handles
|
15012
15989
|
*
|
15013
15990
|
* @param marker - Optional. A string value that identifies the portion of the list to be
|
15014
15991
|
* returned with the next list handles operation. The operation returns a
|
@@ -15118,7 +16095,7 @@ class ShareFileClient extends StorageClient {
|
|
15118
16095
|
}
|
15119
16096
|
/**
|
15120
16097
|
* Force close all handles for a file.
|
15121
|
-
* @see https://
|
16098
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
|
15122
16099
|
*
|
15123
16100
|
* @param marker - Optional. A string value that identifies the position of handles that will
|
15124
16101
|
* be closed with the next force close handles operation.
|
@@ -15139,7 +16116,7 @@ class ShareFileClient extends StorageClient {
|
|
15139
16116
|
}
|
15140
16117
|
/**
|
15141
16118
|
* Force close all handles for a file.
|
15142
|
-
* @see https://
|
16119
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
|
15143
16120
|
*
|
15144
16121
|
* @param options - Options to force close handles operation.
|
15145
16122
|
*/
|
@@ -15166,7 +16143,7 @@ class ShareFileClient extends StorageClient {
|
|
15166
16143
|
}
|
15167
16144
|
/**
|
15168
16145
|
* Force close a specific handle for a file.
|
15169
|
-
* @see https://
|
16146
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
|
15170
16147
|
*
|
15171
16148
|
* @param handleId - Specific handle ID, cannot be asterisk "*".
|
15172
16149
|
* Use forceCloseAllHandles() to close all handles.
|
@@ -15184,6 +16161,18 @@ class ShareFileClient extends StorageClient {
|
|
15184
16161
|
return response;
|
15185
16162
|
});
|
15186
16163
|
}
|
16164
|
+
/**
|
16165
|
+
* NFS only. Creates a hard link to the file file specified by path.
|
16166
|
+
* @param targetFile - Path of the file to create the hard link to, not including the share.
|
16167
|
+
* For example: "targetDirectory/targetSubDirectory/.../targetFile"
|
16168
|
+
* @param options - Options to create hard link operation.
|
16169
|
+
*/
|
16170
|
+
async createHardLink(targetFile, options = {}) {
|
16171
|
+
return tracingClient.withSpan("ShareFileClient-createHardLink", options, async (updatedOptions) => {
|
16172
|
+
const rawResponse = await this.context.createHardLink(targetFile, Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig));
|
16173
|
+
return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
|
16174
|
+
});
|
16175
|
+
}
|
15187
16176
|
/**
|
15188
16177
|
* Get a {@link ShareLeaseClient} that manages leases on the file.
|
15189
16178
|
*
|
@@ -15199,7 +16188,7 @@ class ShareFileClient extends StorageClient {
|
|
15199
16188
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
15200
16189
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
15201
16190
|
*
|
15202
|
-
* @see https://
|
16191
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
15203
16192
|
*
|
15204
16193
|
* @param options - Optional parameters.
|
15205
16194
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
@@ -15217,7 +16206,7 @@ class ShareFileClient extends StorageClient {
|
|
15217
16206
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
15218
16207
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
15219
16208
|
*
|
15220
|
-
* @see https://
|
16209
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
15221
16210
|
*
|
15222
16211
|
* @param options - Optional parameters.
|
15223
16212
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
@@ -15287,9 +16276,9 @@ class ShareFileClient extends StorageClient {
|
|
15287
16276
|
}
|
15288
16277
|
/**
|
15289
16278
|
* A client that manages leases for a {@link ShareFileClient} or {@link ShareClient}.
|
15290
|
-
* @see https://
|
16279
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/lease-file
|
15291
16280
|
* and
|
15292
|
-
* @see https://
|
16281
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/lease-share
|
15293
16282
|
*/
|
15294
16283
|
class ShareLeaseClient {
|
15295
16284
|
/**
|
@@ -15504,7 +16493,9 @@ class ShareServiceClient extends StorageClient {
|
|
15504
16493
|
* @param options -
|
15505
16494
|
* @returns Share creation response and the corresponding share client.
|
15506
16495
|
*/
|
15507
|
-
async createShare(shareName,
|
16496
|
+
async createShare(shareName,
|
16497
|
+
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
16498
|
+
options = {}) {
|
15508
16499
|
return tracingClient.withSpan("ShareServiceClient-createShare", options, async (updatedOptions) => {
|
15509
16500
|
const shareClient = this.getShareClient(shareName);
|
15510
16501
|
const shareCreateResponse = await shareClient.create(updatedOptions);
|
@@ -15521,7 +16512,9 @@ class ShareServiceClient extends StorageClient {
|
|
15521
16512
|
* @param options -
|
15522
16513
|
* @returns Share deletion response and the corresponding share client.
|
15523
16514
|
*/
|
15524
|
-
async deleteShare(shareName,
|
16515
|
+
async deleteShare(shareName,
|
16516
|
+
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
16517
|
+
options = {}) {
|
15525
16518
|
return tracingClient.withSpan("ShareServiceClient-deleteShare", options, async (updatedOptions) => {
|
15526
16519
|
const shareClient = this.getShareClient(shareName);
|
15527
16520
|
return shareClient.delete(updatedOptions);
|
@@ -15530,7 +16523,7 @@ class ShareServiceClient extends StorageClient {
|
|
15530
16523
|
/**
|
15531
16524
|
* Gets the properties of a storage account’s file service, including properties
|
15532
16525
|
* for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
15533
|
-
* @see https://
|
16526
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-file-service-properties
|
15534
16527
|
*
|
15535
16528
|
* @param options - Options to Get Properties operation.
|
15536
16529
|
* @returns Response data for the Get Properties operation.
|
@@ -15543,7 +16536,7 @@ class ShareServiceClient extends StorageClient {
|
|
15543
16536
|
/**
|
15544
16537
|
* Sets properties for a storage account’s file service endpoint, including properties
|
15545
16538
|
* for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
|
15546
|
-
* @see https://
|
16539
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-service-properties
|
15547
16540
|
*
|
15548
16541
|
* @param properties -
|
15549
16542
|
* @param options - Options to Set Properties operation.
|
@@ -15774,7 +16767,7 @@ class ShareServiceClient extends StorageClient {
|
|
15774
16767
|
* Generates an account Shared Access Signature (SAS) URI based on the client properties
|
15775
16768
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
15776
16769
|
*
|
15777
|
-
* @see https://
|
16770
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas
|
15778
16771
|
*
|
15779
16772
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
15780
16773
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -15801,7 +16794,7 @@ class ShareServiceClient extends StorageClient {
|
|
15801
16794
|
* Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties
|
15802
16795
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
15803
16796
|
*
|
15804
|
-
* @see https://
|
16797
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas
|
15805
16798
|
*
|
15806
16799
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
15807
16800
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -15809,7 +16802,9 @@ class ShareServiceClient extends StorageClient {
|
|
15809
16802
|
* @param options - Optional parameters.
|
15810
16803
|
* @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
15811
16804
|
*/
|
15812
|
-
generateSasStringToSign(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco",
|
16805
|
+
generateSasStringToSign(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco",
|
16806
|
+
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
16807
|
+
options = {}) {
|
15813
16808
|
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
15814
16809
|
throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
|
15815
16810
|
}
|
@@ -15866,4 +16861,8 @@ exports.getFileServiceAccountAudience = getFileServiceAccountAudience;
|
|
15866
16861
|
exports.isPipelineLike = isPipelineLike;
|
15867
16862
|
exports.logger = logger;
|
15868
16863
|
exports.newPipeline = newPipeline;
|
16864
|
+
exports.parseOctalFileMode = parseOctalFileMode;
|
16865
|
+
exports.parseSymbolicFileMode = parseSymbolicFileMode;
|
16866
|
+
exports.toOctalFileMode = toOctalFileMode;
|
16867
|
+
exports.toSymbolicFileMode = toSymbolicFileMode;
|
15869
16868
|
//# sourceMappingURL=index.js.map
|