@azure/storage-file-share 12.9.1-alpha.20220321.1 → 12.9.1-alpha.20220418.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/index.js +98 -48
- package/dist/index.js.map +1 -1
- package/dist-esm/src/Clients.js +25 -17
- package/dist-esm/src/Clients.js.map +1 -1
- package/dist-esm/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/mappers.js +14 -0
- package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +34 -5
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/directory.js +8 -13
- package/dist-esm/src/generated/src/operations/directory.js.map +1 -1
- package/dist-esm/src/generated/src/operations/file.js +11 -12
- package/dist-esm/src/generated/src/operations/file.js.map +1 -1
- package/dist-esm/src/generated/src/storageClientContext.js +1 -1
- package/dist-esm/src/generated/src/storageClientContext.js.map +1 -1
- package/dist-esm/src/generatedModels.js.map +1 -1
- package/dist-esm/src/models.js +3 -0
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/utils/constants.js +4 -2
- package/dist-esm/src/utils/constants.js.map +1 -1
- package/package.json +4 -1
- package/types/3.1/storage-file-share.d.ts +48 -0
- package/types/latest/storage-file-share.d.ts +49 -0
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
@@ -334,8 +334,8 @@ function ipRangeToString(ipRange) {
|
|
334
334
|
|
335
335
|
// Copyright (c) Microsoft Corporation.
|
336
336
|
// Licensed under the MIT license.
|
337
|
-
const SDK_VERSION = "12.
|
338
|
-
const SERVICE_VERSION = "2021-
|
337
|
+
const SDK_VERSION = "12.10.0-beta.1";
|
338
|
+
const SERVICE_VERSION = "2021-06-08";
|
339
339
|
const FILE_MAX_SIZE_BYTES = 4 * 1024 * 1024 * 1024 * 1024; // 4TB
|
340
340
|
const FILE_RANGE_MAX_SIZE_BYTES = 4 * 1024 * 1024; // 4MB
|
341
341
|
const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;
|
@@ -369,6 +369,8 @@ const HeaderConstants = {
|
|
369
369
|
X_MS_COPY_SOURCE: "x-ms-copy-source",
|
370
370
|
X_MS_DATE: "x-ms-date",
|
371
371
|
};
|
372
|
+
const FileAttributesPreserve = "Preserve";
|
373
|
+
const FileAttributesNone = "None";
|
372
374
|
const StorageFileLoggingAllowedHeaderNames = [
|
373
375
|
"Access-Control-Allow-Origin",
|
374
376
|
"Cache-Control",
|
@@ -5861,6 +5863,13 @@ const FileUploadRangeHeaders = {
|
|
5861
5863
|
name: "Boolean"
|
5862
5864
|
}
|
5863
5865
|
},
|
5866
|
+
fileLastWriteTime: {
|
5867
|
+
serializedName: "x-ms-file-last-write-time",
|
5868
|
+
xmlName: "x-ms-file-last-write-time",
|
5869
|
+
type: {
|
5870
|
+
name: "DateTimeRfc1123"
|
5871
|
+
}
|
5872
|
+
},
|
5864
5873
|
errorCode: {
|
5865
5874
|
serializedName: "x-ms-error-code",
|
5866
5875
|
xmlName: "x-ms-error-code",
|
@@ -5942,6 +5951,13 @@ const FileUploadRangeFromURLHeaders = {
|
|
5942
5951
|
name: "Boolean"
|
5943
5952
|
}
|
5944
5953
|
},
|
5954
|
+
fileLastWriteTime: {
|
5955
|
+
serializedName: "x-ms-file-last-write-time",
|
5956
|
+
xmlName: "x-ms-file-last-write-time",
|
5957
|
+
type: {
|
5958
|
+
name: "DateTimeRfc1123"
|
5959
|
+
}
|
5960
|
+
},
|
5945
5961
|
errorCode: {
|
5946
5962
|
serializedName: "x-ms-error-code",
|
5947
5963
|
xmlName: "x-ms-error-code",
|
@@ -6634,7 +6650,7 @@ const timeoutInSeconds = {
|
|
6634
6650
|
const version = {
|
6635
6651
|
parameterPath: "version",
|
6636
6652
|
mapper: {
|
6637
|
-
defaultValue: "2021-
|
6653
|
+
defaultValue: "2021-06-08",
|
6638
6654
|
isConstant: true,
|
6639
6655
|
serializedName: "x-ms-version",
|
6640
6656
|
type: {
|
@@ -7104,10 +7120,9 @@ const fileAttributes = {
|
|
7104
7120
|
}
|
7105
7121
|
};
|
7106
7122
|
const fileCreatedOn = {
|
7107
|
-
parameterPath: "fileCreatedOn",
|
7123
|
+
parameterPath: ["options", "fileCreatedOn"],
|
7108
7124
|
mapper: {
|
7109
7125
|
serializedName: "x-ms-file-creation-time",
|
7110
|
-
required: true,
|
7111
7126
|
xmlName: "x-ms-file-creation-time",
|
7112
7127
|
type: {
|
7113
7128
|
name: "String"
|
@@ -7115,16 +7130,25 @@ const fileCreatedOn = {
|
|
7115
7130
|
}
|
7116
7131
|
};
|
7117
7132
|
const fileLastWriteOn = {
|
7118
|
-
parameterPath: "fileLastWriteOn",
|
7133
|
+
parameterPath: ["options", "fileLastWriteOn"],
|
7119
7134
|
mapper: {
|
7120
7135
|
serializedName: "x-ms-file-last-write-time",
|
7121
|
-
required: true,
|
7122
7136
|
xmlName: "x-ms-file-last-write-time",
|
7123
7137
|
type: {
|
7124
7138
|
name: "String"
|
7125
7139
|
}
|
7126
7140
|
}
|
7127
7141
|
};
|
7142
|
+
const fileChangeOn = {
|
7143
|
+
parameterPath: ["options", "fileChangeOn"],
|
7144
|
+
mapper: {
|
7145
|
+
serializedName: "x-ms-file-change-time",
|
7146
|
+
xmlName: "x-ms-file-change-time",
|
7147
|
+
type: {
|
7148
|
+
name: "String"
|
7149
|
+
}
|
7150
|
+
}
|
7151
|
+
};
|
7128
7152
|
const include1 = {
|
7129
7153
|
parameterPath: ["options", "include"],
|
7130
7154
|
mapper: {
|
@@ -7292,6 +7316,16 @@ const fileLastWriteTime = {
|
|
7292
7316
|
}
|
7293
7317
|
}
|
7294
7318
|
};
|
7319
|
+
const fileChangeTime = {
|
7320
|
+
parameterPath: ["options", "copyFileSmbInfo", "fileChangeTime"],
|
7321
|
+
mapper: {
|
7322
|
+
serializedName: "x-ms-file-change-time",
|
7323
|
+
xmlName: "x-ms-file-change-time",
|
7324
|
+
type: {
|
7325
|
+
name: "String"
|
7326
|
+
}
|
7327
|
+
}
|
7328
|
+
};
|
7295
7329
|
const fileContentLength = {
|
7296
7330
|
parameterPath: "fileContentLength",
|
7297
7331
|
mapper: {
|
@@ -7492,6 +7526,17 @@ const contentMD5 = {
|
|
7492
7526
|
}
|
7493
7527
|
}
|
7494
7528
|
};
|
7529
|
+
const fileLastWrittenMode = {
|
7530
|
+
parameterPath: ["options", "fileLastWrittenMode"],
|
7531
|
+
mapper: {
|
7532
|
+
serializedName: "x-ms-file-last-write-time",
|
7533
|
+
xmlName: "x-ms-file-last-write-time",
|
7534
|
+
type: {
|
7535
|
+
name: "Enum",
|
7536
|
+
allowedValues: ["Now", "Preserve"]
|
7537
|
+
}
|
7538
|
+
}
|
7539
|
+
};
|
7495
7540
|
const copySource = {
|
7496
7541
|
parameterPath: "copySource",
|
7497
7542
|
mapper: {
|
@@ -8506,15 +8551,11 @@ class Directory {
|
|
8506
8551
|
* Creates a new directory under the specified share or parent directory.
|
8507
8552
|
* @param fileAttributes If specified, the provided file attributes shall be set. Default value:
|
8508
8553
|
* ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
|
8509
|
-
* @param fileCreatedOn Creation time for the file/directory. Default value: Now.
|
8510
|
-
* @param fileLastWriteOn Last write time for the file/directory. Default value: Now.
|
8511
8554
|
* @param options The options parameters.
|
8512
8555
|
*/
|
8513
|
-
create(fileAttributes,
|
8556
|
+
create(fileAttributes, options) {
|
8514
8557
|
const operationArguments = {
|
8515
8558
|
fileAttributes,
|
8516
|
-
fileCreatedOn,
|
8517
|
-
fileLastWriteOn,
|
8518
8559
|
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
8519
8560
|
};
|
8520
8561
|
return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);
|
@@ -8546,15 +8587,11 @@ class Directory {
|
|
8546
8587
|
* Sets properties on the directory.
|
8547
8588
|
* @param fileAttributes If specified, the provided file attributes shall be set. Default value:
|
8548
8589
|
* ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
|
8549
|
-
* @param fileCreatedOn Creation time for the file/directory. Default value: Now.
|
8550
|
-
* @param fileLastWriteOn Last write time for the file/directory. Default value: Now.
|
8551
8590
|
* @param options The options parameters.
|
8552
8591
|
*/
|
8553
|
-
setProperties(fileAttributes,
|
8592
|
+
setProperties(fileAttributes, options) {
|
8554
8593
|
const operationArguments = {
|
8555
8594
|
fileAttributes,
|
8556
|
-
fileCreatedOn,
|
8557
|
-
fileLastWriteOn,
|
8558
8595
|
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
8559
8596
|
};
|
8560
8597
|
return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
|
@@ -8640,7 +8677,8 @@ const createOperationSpec$1 = {
|
|
8640
8677
|
filePermissionKey1,
|
8641
8678
|
fileAttributes,
|
8642
8679
|
fileCreatedOn,
|
8643
|
-
fileLastWriteOn
|
8680
|
+
fileLastWriteOn,
|
8681
|
+
fileChangeOn
|
8644
8682
|
],
|
8645
8683
|
isXML: true,
|
8646
8684
|
serializer: xmlSerializer$1
|
@@ -8710,7 +8748,8 @@ const setPropertiesOperationSpec = {
|
|
8710
8748
|
filePermissionKey1,
|
8711
8749
|
fileAttributes,
|
8712
8750
|
fileCreatedOn,
|
8713
|
-
fileLastWriteOn
|
8751
|
+
fileLastWriteOn,
|
8752
|
+
fileChangeOn
|
8714
8753
|
],
|
8715
8754
|
isXML: true,
|
8716
8755
|
serializer: xmlSerializer$1
|
@@ -8861,7 +8900,8 @@ const renameOperationSpec$1 = {
|
|
8861
8900
|
destinationLeaseId,
|
8862
8901
|
fileAttributes1,
|
8863
8902
|
fileCreationTime,
|
8864
|
-
fileLastWriteTime
|
8903
|
+
fileLastWriteTime,
|
8904
|
+
fileChangeTime
|
8865
8905
|
],
|
8866
8906
|
isXML: true,
|
8867
8907
|
serializer: xmlSerializer$1
|
@@ -8888,16 +8928,12 @@ class File {
|
|
8888
8928
|
* @param fileContentLength Specifies the maximum size for the file, up to 4 TB.
|
8889
8929
|
* @param fileAttributes If specified, the provided file attributes shall be set. Default value:
|
8890
8930
|
* ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
|
8891
|
-
* @param fileCreatedOn Creation time for the file/directory. Default value: Now.
|
8892
|
-
* @param fileLastWriteOn Last write time for the file/directory. Default value: Now.
|
8893
8931
|
* @param options The options parameters.
|
8894
8932
|
*/
|
8895
|
-
create(fileContentLength, fileAttributes,
|
8933
|
+
create(fileContentLength, fileAttributes, options) {
|
8896
8934
|
const operationArguments = {
|
8897
8935
|
fileContentLength,
|
8898
8936
|
fileAttributes,
|
8899
|
-
fileCreatedOn,
|
8900
|
-
fileLastWriteOn,
|
8901
8937
|
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
8902
8938
|
};
|
8903
8939
|
return this.client.sendOperationRequest(operationArguments, createOperationSpec);
|
@@ -8937,15 +8973,11 @@ class File {
|
|
8937
8973
|
* Sets HTTP headers on the file.
|
8938
8974
|
* @param fileAttributes If specified, the provided file attributes shall be set. Default value:
|
8939
8975
|
* ‘Archive’ for file and ‘Directory’ for directory. ‘None’ can also be specified as default.
|
8940
|
-
* @param fileCreatedOn Creation time for the file/directory. Default value: Now.
|
8941
|
-
* @param fileLastWriteOn Last write time for the file/directory. Default value: Now.
|
8942
8976
|
* @param options The options parameters.
|
8943
8977
|
*/
|
8944
|
-
setHttpHeaders(fileAttributes,
|
8978
|
+
setHttpHeaders(fileAttributes, options) {
|
8945
8979
|
const operationArguments = {
|
8946
8980
|
fileAttributes,
|
8947
|
-
fileCreatedOn,
|
8948
|
-
fileLastWriteOn,
|
8949
8981
|
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
8950
8982
|
};
|
8951
8983
|
return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);
|
@@ -9158,6 +9190,7 @@ const createOperationSpec = {
|
|
9158
9190
|
fileAttributes,
|
9159
9191
|
fileCreatedOn,
|
9160
9192
|
fileLastWriteOn,
|
9193
|
+
fileChangeOn,
|
9161
9194
|
fileContentLength,
|
9162
9195
|
fileTypeConstant,
|
9163
9196
|
fileContentType,
|
@@ -9272,6 +9305,7 @@ const setHttpHeadersOperationSpec = {
|
|
9272
9305
|
fileAttributes,
|
9273
9306
|
fileCreatedOn,
|
9274
9307
|
fileLastWriteOn,
|
9308
|
+
fileChangeOn,
|
9275
9309
|
fileContentType,
|
9276
9310
|
fileContentEncoding,
|
9277
9311
|
fileContentLanguage,
|
@@ -9427,7 +9461,8 @@ const uploadRangeOperationSpec = {
|
|
9427
9461
|
range1,
|
9428
9462
|
fileRangeWrite,
|
9429
9463
|
contentLength,
|
9430
|
-
contentMD5
|
9464
|
+
contentMD5,
|
9465
|
+
fileLastWrittenMode
|
9431
9466
|
],
|
9432
9467
|
contentType: "application/octet-stream",
|
9433
9468
|
isXML: true,
|
@@ -9453,6 +9488,7 @@ const uploadRangeFromURLOperationSpec = {
|
|
9453
9488
|
leaseId,
|
9454
9489
|
range1,
|
9455
9490
|
contentLength,
|
9491
|
+
fileLastWrittenMode,
|
9456
9492
|
copySource,
|
9457
9493
|
sourceRange,
|
9458
9494
|
fileRangeWriteFromUrl,
|
@@ -9517,6 +9553,7 @@ const startCopyOperationSpec = {
|
|
9517
9553
|
fileAttributes1,
|
9518
9554
|
fileCreationTime,
|
9519
9555
|
fileLastWriteTime,
|
9556
|
+
fileChangeTime,
|
9520
9557
|
copySource,
|
9521
9558
|
filePermissionCopyMode,
|
9522
9559
|
ignoreReadOnly1,
|
@@ -9631,7 +9668,9 @@ const renameOperationSpec = {
|
|
9631
9668
|
destinationLeaseId,
|
9632
9669
|
fileAttributes1,
|
9633
9670
|
fileCreationTime,
|
9634
|
-
fileLastWriteTime
|
9671
|
+
fileLastWriteTime,
|
9672
|
+
fileChangeTime,
|
9673
|
+
fileContentType
|
9635
9674
|
],
|
9636
9675
|
isXML: true,
|
9637
9676
|
serializer: xmlSerializer
|
@@ -10377,7 +10416,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
|
10377
10416
|
// Parameter assignments
|
10378
10417
|
this.url = url;
|
10379
10418
|
// Assigning values to Constant parameters
|
10380
|
-
this.version = options.version || "2021-
|
10419
|
+
this.version = options.version || "2021-06-08";
|
10381
10420
|
this.fileRangeWriteFromUrl = options.fileRangeWriteFromUrl || "update";
|
10382
10421
|
}
|
10383
10422
|
}
|
@@ -11141,6 +11180,9 @@ function fileCreationTimeToString(time) {
|
|
11141
11180
|
function fileLastWriteTimeToString(time) {
|
11142
11181
|
return time instanceof Date ? truncatedISO8061Date(time) : time;
|
11143
11182
|
}
|
11183
|
+
function fileChangeTimeToString(time) {
|
11184
|
+
return time instanceof Date ? truncatedISO8061Date(time) : time;
|
11185
|
+
}
|
11144
11186
|
|
11145
11187
|
// Copyright (c) Microsoft Corporation.
|
11146
11188
|
/**
|
@@ -12342,7 +12384,9 @@ class ShareDirectoryClient extends StorageClient {
|
|
12342
12384
|
attributes.directory = true;
|
12343
12385
|
options.fileAttributes = attributes;
|
12344
12386
|
}
|
12345
|
-
return await this.context.create(
|
12387
|
+
return await this.context.create(options.fileAttributes
|
12388
|
+
? fileAttributesToString(options.fileAttributes)
|
12389
|
+
: FileAttributesNone, Object.assign({ abortSignal: options.abortSignal, metadata: options.metadata, filePermission: options.filePermission, filePermissionKey: options.filePermissionKey, fileChangeOn: fileChangeTimeToString(options.changeTime), fileCreatedOn: fileCreationTimeToString(options.creationTime), fileLastWriteOn: fileLastWriteTimeToString(options.lastWriteTime) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
12346
12390
|
}
|
12347
12391
|
catch (e) {
|
12348
12392
|
span.setStatus({
|
@@ -12398,7 +12442,9 @@ class ShareDirectoryClient extends StorageClient {
|
|
12398
12442
|
const { span, updatedOptions } = createSpan("ShareDirectoryClient-setProperties", properties);
|
12399
12443
|
try {
|
12400
12444
|
properties = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(properties);
|
12401
|
-
return await this.context.setProperties(
|
12445
|
+
return await this.context.setProperties(properties.fileAttributes
|
12446
|
+
? fileAttributesToString(properties.fileAttributes)
|
12447
|
+
: FileAttributesPreserve, Object.assign({ abortSignal: properties.abortSignal, filePermission: properties.filePermission, filePermissionKey: properties.filePermissionKey, fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(properties.creationTime), fileLastWriteOn: fileLastWriteTimeToString(properties.lastWriteTime) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
12402
12448
|
}
|
12403
12449
|
catch (e) {
|
12404
12450
|
span.setStatus({
|
@@ -13362,14 +13408,10 @@ class ShareFileClient extends StorageClient {
|
|
13362
13408
|
throw new RangeError(`File size must >= 0 and < ${FILE_MAX_SIZE_BYTES}.`);
|
13363
13409
|
}
|
13364
13410
|
options = validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions(options);
|
13365
|
-
if (!options.fileAttributes) {
|
13366
|
-
// Note: It would be Archive in service side if None is set.
|
13367
|
-
const attributes = new FileSystemAttributes();
|
13368
|
-
attributes.none = true;
|
13369
|
-
options.fileAttributes = attributes;
|
13370
|
-
}
|
13371
13411
|
options.fileHttpHeaders = options.fileHttpHeaders || {};
|
13372
|
-
return await this.context.create(size,
|
13412
|
+
return await this.context.create(size, options.fileAttributes
|
13413
|
+
? fileAttributesToString(options.fileAttributes)
|
13414
|
+
: FileAttributesNone, Object.assign({ abortSignal: options.abortSignal, fileHttpHeaders: options.fileHttpHeaders, metadata: options.metadata, filePermission: options.filePermission, filePermissionKey: options.filePermissionKey, fileChangeOn: fileChangeTimeToString(options.changeTime), fileCreatedOn: fileCreationTimeToString(options.creationTime), fileLastWriteOn: fileLastWriteTimeToString(options.lastWriteTime), leaseAccessConditions: options.leaseAccessConditions }, convertTracingToRequestOptionsBase(updatedOptions)));
|
13373
13415
|
}
|
13374
13416
|
catch (e) {
|
13375
13417
|
span.setStatus({
|
@@ -13578,7 +13620,9 @@ class ShareFileClient extends StorageClient {
|
|
13578
13620
|
try {
|
13579
13621
|
properties = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(properties);
|
13580
13622
|
properties.fileHttpHeaders = properties.fileHttpHeaders || {};
|
13581
|
-
return await this.context.setHttpHeaders(
|
13623
|
+
return await this.context.setHttpHeaders(properties.fileAttributes
|
13624
|
+
? fileAttributesToString(properties.fileAttributes)
|
13625
|
+
: FileAttributesPreserve, Object.assign({ abortSignal: properties.abortSignal, fileHttpHeaders: properties.fileHttpHeaders, filePermission: properties.filePermission, filePermissionKey: properties.filePermissionKey, leaseAccessConditions: properties.leaseAccessConditions, fileChangeOn: fileChangeTimeToString(properties.changeTime), fileCreatedOn: fileCreationTimeToString(properties.creationTime), fileLastWriteOn: fileLastWriteTimeToString(properties.lastWriteTime) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
13582
13626
|
}
|
13583
13627
|
catch (e) {
|
13584
13628
|
span.setStatus({
|
@@ -13683,7 +13727,9 @@ class ShareFileClient extends StorageClient {
|
|
13683
13727
|
try {
|
13684
13728
|
// FileAttributes, filePermission, createTime, lastWriteTime will all be preserved
|
13685
13729
|
options = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(options);
|
13686
|
-
return await this.context.setHttpHeaders(
|
13730
|
+
return await this.context.setHttpHeaders(options.fileAttributes
|
13731
|
+
? fileAttributesToString(options.fileAttributes)
|
13732
|
+
: FileAttributesPreserve, Object.assign({ abortSignal: options.abortSignal, fileHttpHeaders, filePermission: options.filePermission, filePermissionKey: options.filePermissionKey, leaseAccessConditions: options.leaseAccessConditions, fileCreatedOn: fileCreationTimeToString(options.creationTime), fileLastWriteOn: fileLastWriteTimeToString(options.lastWriteTime), fileChangeOn: fileChangeTimeToString(options.changeTime) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
13687
13733
|
}
|
13688
13734
|
catch (e) {
|
13689
13735
|
span.setStatus({
|
@@ -13715,7 +13761,7 @@ class ShareFileClient extends StorageClient {
|
|
13715
13761
|
}
|
13716
13762
|
// FileAttributes, filePermission, createTime, lastWriteTime will all be preserved.
|
13717
13763
|
options = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(options);
|
13718
|
-
return await this.context.setHttpHeaders(fileAttributesToString(options.fileAttributes),
|
13764
|
+
return await this.context.setHttpHeaders(fileAttributesToString(options.fileAttributes), Object.assign({ abortSignal: options.abortSignal, fileContentLength: length, filePermission: options.filePermission, filePermissionKey: options.filePermissionKey, leaseAccessConditions: options.leaseAccessConditions, fileChangeOn: fileChangeTimeToString(options.changeTime), fileCreatedOn: fileCreationTimeToString(options.creationTime), fileLastWriteOn: fileLastWriteTimeToString(options.lastWriteTime) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
13719
13765
|
}
|
13720
13766
|
catch (e) {
|
13721
13767
|
span.setStatus({
|
@@ -13796,7 +13842,7 @@ class ShareFileClient extends StorageClient {
|
|
13796
13842
|
}
|
13797
13843
|
return await this.context.uploadRange(rangeToString({ count: contentLength, offset }), "update", contentLength, Object.assign(Object.assign({ abortSignal: options.abortSignal, contentMD5: options.contentMD5, requestOptions: {
|
13798
13844
|
onUploadProgress: options.onProgress,
|
13799
|
-
}, body: body }, convertTracingToRequestOptionsBase(updatedOptions)), { leaseAccessConditions: options.leaseAccessConditions }));
|
13845
|
+
}, body: body }, convertTracingToRequestOptionsBase(updatedOptions)), { leaseAccessConditions: options.leaseAccessConditions, fileLastWrittenMode: options.fileLastWrittenMode }));
|
13800
13846
|
}
|
13801
13847
|
catch (e) {
|
13802
13848
|
span.setStatus({
|
@@ -13828,7 +13874,7 @@ class ShareFileClient extends StorageClient {
|
|
13828
13874
|
if (count <= 0 || count > FILE_RANGE_MAX_SIZE_BYTES) {
|
13829
13875
|
throw new RangeError(`count must be > 0 and <= ${FILE_RANGE_MAX_SIZE_BYTES} bytes`);
|
13830
13876
|
}
|
13831
|
-
return await this.context.uploadRangeFromURL(rangeToString({ offset: destOffset, count }), sourceURL, 0, Object.assign(Object.assign({ abortSignal: options.abortSignal, sourceRange: rangeToString({ offset: sourceOffset, count }), sourceModifiedAccessConditions: options.sourceConditions, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
13877
|
+
return await this.context.uploadRangeFromURL(rangeToString({ offset: destOffset, count }), sourceURL, 0, Object.assign(Object.assign({ abortSignal: options.abortSignal, sourceRange: rangeToString({ offset: sourceOffset, count }), sourceModifiedAccessConditions: options.sourceConditions, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), fileLastWrittenMode: options.fileLastWrittenMode }, options), convertTracingToRequestOptionsBase(updatedOptions)));
|
13832
13878
|
}
|
13833
13879
|
catch (e) {
|
13834
13880
|
span.setStatus({
|
@@ -13855,7 +13901,7 @@ class ShareFileClient extends StorageClient {
|
|
13855
13901
|
if (offset < 0 || contentLength <= 0) {
|
13856
13902
|
throw new RangeError(`offset must >= 0 and contentLength must be > 0`);
|
13857
13903
|
}
|
13858
|
-
return await this.context.uploadRange(rangeToString({ count: contentLength, offset }), "clear", 0, Object.assign(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)), { leaseAccessConditions: options.leaseAccessConditions }));
|
13904
|
+
return await this.context.uploadRange(rangeToString({ count: contentLength, offset }), "clear", 0, Object.assign(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)), { leaseAccessConditions: options.leaseAccessConditions, fileLastWrittenMode: options.fileLastWrittenMode }));
|
13859
13905
|
}
|
13860
13906
|
catch (e) {
|
13861
13907
|
span.setStatus({
|
@@ -14668,6 +14714,10 @@ class ShareFileClient extends StorageClient {
|
|
14668
14714
|
? {
|
14669
14715
|
destinationLeaseId: updatedOptions.destinationLeaseAccessConditions.leaseId,
|
14670
14716
|
}
|
14717
|
+
: undefined, fileHttpHeaders: options.contentType
|
14718
|
+
? {
|
14719
|
+
fileContentType: options.contentType,
|
14720
|
+
}
|
14671
14721
|
: undefined }));
|
14672
14722
|
return {
|
14673
14723
|
destinationFileClient: destFile,
|