@azure/storage-file-share 12.26.0-beta.1 → 12.27.0-alpha.20250217.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +16 -18
  3. package/dist/index.js +1428 -431
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -1
  6. package/dist-esm/storage-blob/src/BatchResponseParser.js +1 -1
  7. package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
  8. package/dist-esm/storage-blob/src/BatchUtils.js.map +1 -1
  9. package/dist-esm/storage-blob/src/BlobBatch.js +1 -1
  10. package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
  11. package/dist-esm/storage-blob/src/BlobBatchClient.js +3 -3
  12. package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
  13. package/dist-esm/storage-blob/src/BlobDownloadResponse.js +1 -1
  14. package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
  15. package/dist-esm/storage-blob/src/BlobLeaseClient.js +10 -10
  16. package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
  17. package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
  18. package/dist-esm/storage-blob/src/BlobServiceClient.js +12 -14
  19. package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
  20. package/dist-esm/storage-blob/src/Clients.js +47 -48
  21. package/dist-esm/storage-blob/src/Clients.js.map +1 -1
  22. package/dist-esm/storage-blob/src/ContainerClient.js +20 -21
  23. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
  24. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
  25. package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
  26. package/dist-esm/storage-blob/src/Range.js.map +1 -1
  27. package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -1
  28. package/dist-esm/storage-blob/src/StorageClient.js.map +1 -1
  29. package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -1
  30. package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
  31. package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -1
  32. package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -1
  33. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
  34. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +1 -1
  35. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -1
  36. package/dist-esm/storage-blob/src/generated/src/storageClient.js +1 -1
  37. package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
  38. package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
  39. package/dist-esm/storage-blob/src/models.js +2 -2
  40. package/dist-esm/storage-blob/src/models.js.map +1 -1
  41. package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -1
  42. package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -1
  43. package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -1
  44. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
  45. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -1
  46. package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js.map +1 -1
  47. package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js.map +1 -1
  48. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
  49. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +1 -1
  50. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -1
  51. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +2 -2
  52. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  53. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -1
  54. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
  55. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
  56. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
  57. package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +2 -2
  58. package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -1
  59. package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js +1 -1
  60. package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -1
  61. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +1 -1
  62. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
  63. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +1 -1
  64. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
  65. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +1 -1
  66. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -1
  67. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
  68. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
  69. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
  70. package/dist-esm/storage-blob/src/utils/cache.js.map +1 -1
  71. package/dist-esm/storage-blob/src/utils/constants.js +1 -1
  72. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
  73. package/dist-esm/storage-blob/src/utils/utils.common.js +3 -3
  74. package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
  75. package/dist-esm/storage-blob/src/utils/utils.node.js +1 -1
  76. package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -1
  77. package/dist-esm/storage-file-share/src/AccountSASPermissions.js +2 -2
  78. package/dist-esm/storage-file-share/src/AccountSASPermissions.js.map +1 -1
  79. package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js +1 -1
  80. package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js.map +1 -1
  81. package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js +1 -1
  82. package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -1
  83. package/dist-esm/storage-file-share/src/Clients.js +103 -79
  84. package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
  85. package/dist-esm/storage-file-share/src/FileDownloadResponse.js +25 -1
  86. package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -1
  87. package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -1
  88. package/dist-esm/storage-file-share/src/FileSystemAttributes.js +1 -1
  89. package/dist-esm/storage-file-share/src/FileSystemAttributes.js.map +1 -1
  90. package/dist-esm/storage-file-share/src/Pipeline.js.map +1 -1
  91. package/dist-esm/storage-file-share/src/Range.js.map +1 -1
  92. package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -1
  93. package/dist-esm/storage-file-share/src/ShareClientInternal.js.map +1 -1
  94. package/dist-esm/storage-file-share/src/ShareSASPermissions.js +1 -1
  95. package/dist-esm/storage-file-share/src/ShareSASPermissions.js.map +1 -1
  96. package/dist-esm/storage-file-share/src/ShareServiceClient.js +13 -7
  97. package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
  98. package/dist-esm/storage-file-share/src/StorageClient.js.map +1 -1
  99. package/dist-esm/storage-file-share/src/StorageContextClient.js.map +1 -1
  100. package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js.map +1 -1
  101. package/dist-esm/storage-file-share/src/generated/src/models/index.js +10 -0
  102. package/dist-esm/storage-file-share/src/generated/src/models/index.js.map +1 -1
  103. package/dist-esm/storage-file-share/src/generated/src/models/mappers.js +544 -0
  104. package/dist-esm/storage-file-share/src/generated/src/models/mappers.js.map +1 -1
  105. package/dist-esm/storage-file-share/src/generated/src/models/parameters.js +108 -3
  106. package/dist-esm/storage-file-share/src/generated/src/models/parameters.js.map +1 -1
  107. package/dist-esm/storage-file-share/src/generated/src/operations/directory.js +12 -10
  108. package/dist-esm/storage-file-share/src/generated/src/operations/directory.js.map +1 -1
  109. package/dist-esm/storage-file-share/src/generated/src/operations/file.js +125 -10
  110. package/dist-esm/storage-file-share/src/generated/src/operations/file.js.map +1 -1
  111. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/directory.js.map +1 -1
  112. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/file.js.map +1 -1
  113. package/dist-esm/storage-file-share/src/generated/src/storageClient.js +2 -2
  114. package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
  115. package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -1
  116. package/dist-esm/storage-file-share/src/index.browser.js +1 -0
  117. package/dist-esm/storage-file-share/src/index.browser.js.map +1 -1
  118. package/dist-esm/storage-file-share/src/index.js +1 -0
  119. package/dist-esm/storage-file-share/src/index.js.map +1 -1
  120. package/dist-esm/storage-file-share/src/models.js +0 -21
  121. package/dist-esm/storage-file-share/src/models.js.map +1 -1
  122. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js.map +1 -1
  123. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js +1 -1
  124. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js.map +1 -1
  125. package/dist-esm/storage-file-share/src/utils/BufferScheduler.js.map +1 -1
  126. package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js.map +1 -1
  127. package/dist-esm/storage-file-share/src/utils/constants.js +2 -2
  128. package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
  129. package/dist-esm/storage-file-share/src/utils/utils.common.js +214 -3
  130. package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
  131. package/package.json +11 -15
  132. package/types/latest/storage-file-share.d.ts +978 -144
@@ -4,14 +4,13 @@ import { __asyncGenerator, __asyncValues, __await } from "tslib";
4
4
  import { isTokenCredential } from "@azure/core-auth";
5
5
  import { isNode } from "@azure/core-util";
6
6
  import { isPipelineLike, newPipeline } from "./Pipeline";
7
- import { DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, DEFAULT_HIGH_LEVEL_CONCURRENCY, FILE_MAX_SIZE_BYTES, FILE_RANGE_MAX_SIZE_BYTES, URLConstants, FileAttributesPreserve, FileAttributesNone, } from "./utils/constants";
8
- import { appendToURLPath, setURLParameter, truncatedISO8061Date, extractConnectionStringParts, getShareNameAndPathFromUrl, appendToURLQuery, httpAuthorizationToString, setURLPath, setURLQueries, EscapePath, ConvertInternalResponseOfListFiles, ConvertInternalResponseOfListHandles, assertResponse, removeEmptyString, asSharePermission, } from "./utils/utils.common";
7
+ import { DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, DEFAULT_HIGH_LEVEL_CONCURRENCY, FILE_MAX_SIZE_BYTES, FILE_RANGE_MAX_SIZE_BYTES, URLConstants, } from "./utils/constants";
8
+ import { appendToURLPath, setURLParameter, truncatedISO8061Date, extractConnectionStringParts, getShareNameAndPathFromUrl, appendToURLQuery, httpAuthorizationToString, setURLPath, setURLQueries, EscapePath, ConvertInternalResponseOfListFiles, ConvertInternalResponseOfListHandles, assertResponse, removeEmptyString, asSharePermission, parseOctalFileMode, toOctalFileMode, } from "./utils/utils.common";
9
9
  import { Credential } from "../../storage-blob/src/credentials/Credential";
10
10
  import { StorageSharedKeyCredential } from "../../storage-blob/src/credentials/StorageSharedKeyCredential";
11
11
  import { AnonymousCredential } from "../../storage-blob/src/credentials/AnonymousCredential";
12
12
  import { tracingClient } from "./utils/tracing";
13
13
  import { StorageClient } from "./StorageClient";
14
- import { FileSystemAttributes } from "./FileSystemAttributes";
15
14
  import { FileDownloadResponse } from "./FileDownloadResponse";
16
15
  import { rangeToString } from "./Range";
17
16
  import { fileAttributesToString, fileCreationTimeToString, fileLastWriteTimeToString, validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions, validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions, toShareProtocolsString, toShareProtocols, fileChangeTimeToString, } from "./models";
@@ -32,7 +31,6 @@ export class ShareClient extends StorageClient {
32
31
  }
33
32
  constructor(urlOrConnectionString, credentialOrPipelineOrShareName,
34
33
  // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
35
- /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
36
34
  options) {
37
35
  let pipeline;
38
36
  let url;
@@ -98,7 +96,7 @@ export class ShareClient extends StorageClient {
98
96
  /**
99
97
  * Creates a new share under the specified account. If the share with
100
98
  * the same name already exists, the operation fails.
101
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-share
99
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-share
102
100
  *
103
101
  * @param options - Options to Share Create operation.
104
102
  * @returns Response data for the Share Create operation.
@@ -111,7 +109,7 @@ export class ShareClient extends StorageClient {
111
109
  /**
112
110
  * Creates a new share under the specified account. If the share with
113
111
  * the same name already exists, it is not changed.
114
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-share
112
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-share
115
113
  *
116
114
  * @param options -
117
115
  */
@@ -154,7 +152,7 @@ export class ShareClient extends StorageClient {
154
152
  }
155
153
  /**
156
154
  * Creates a new subdirectory under this share.
157
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-directory
155
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory
158
156
  *
159
157
  * @param directoryName -
160
158
  * @param options - Options to Directory Create operation.
@@ -173,7 +171,7 @@ export class ShareClient extends StorageClient {
173
171
  /**
174
172
  * Removes the specified empty sub directory under this share.
175
173
  * Note that the directory must be empty before it can be deleted.
176
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-directory
174
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-directory
177
175
  *
178
176
  * @param directoryName -
179
177
  * @param options - Options to Directory Delete operation.
@@ -188,7 +186,7 @@ export class ShareClient extends StorageClient {
188
186
  /**
189
187
  * Creates a new file or replaces a file under the root directory of this share.
190
188
  * Note it only initializes the file with no content.
191
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-file
189
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-file
192
190
  *
193
191
  * @param fileName -
194
192
  * @param size - Specifies the maximum size in bytes for the file, up to 4 TB.
@@ -219,7 +217,7 @@ export class ShareClient extends StorageClient {
219
217
  * a share. An attempt to perform this operation on a share snapshot will fail with 400
220
218
  * (`InvalidQueryParameterValue`)
221
219
  *
222
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-file2
220
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-file2
223
221
  *
224
222
  * @param directoryName -
225
223
  * @param fileName -
@@ -259,7 +257,7 @@ export class ShareClient extends StorageClient {
259
257
  /**
260
258
  * Returns all user-defined metadata and system properties for the specified
261
259
  * share.
262
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-share-properties
260
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-share-properties
263
261
  *
264
262
  * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
265
263
  * they originally contained uppercase characters. This differs from the metadata keys returned by
@@ -277,7 +275,7 @@ export class ShareClient extends StorageClient {
277
275
  /**
278
276
  * Marks the specified share for deletion. The share and any directories or files
279
277
  * contained within it are later deleted during garbage collection.
280
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-share
278
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-share
281
279
  *
282
280
  * @param options - Options to Share Delete operation.
283
281
  * @returns Response data for the Share Delete operation.
@@ -290,7 +288,7 @@ export class ShareClient extends StorageClient {
290
288
  /**
291
289
  * Marks the specified share for deletion if it exists. The share and any directories or files
292
290
  * contained within it are later deleted during garbage collection.
293
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-share
291
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-share
294
292
  *
295
293
  * @param options -
296
294
  */
@@ -314,7 +312,7 @@ export class ShareClient extends StorageClient {
314
312
  *
315
313
  * If no option provided, or no metadata defined in the option parameter, the share
316
314
  * metadata will be removed.
317
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-share-metadata
315
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-share-metadata
318
316
  *
319
317
  * @param metadata - If no metadata provided, all existing directory metadata will be removed.
320
318
  * @param option - Options to Share Set Metadata operation.
@@ -332,7 +330,7 @@ export class ShareClient extends StorageClient {
332
330
  * WARNING: JavaScript Date will potential lost precision when parsing start and expiry string.
333
331
  * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z".
334
332
  *
335
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-share-acl
333
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-share-acl
336
334
  *
337
335
  * @param option - Options to Share Get Access Policy operation.
338
336
  * @returns Response data for the Share Get Access Policy operation.
@@ -381,7 +379,7 @@ export class ShareClient extends StorageClient {
381
379
  * When you establish a stored access policy on a share, it may take up to 30 seconds to take effect.
382
380
  * During this interval, a shared access signature that is associated with the stored access policy will
383
381
  * fail with status code 403 (Forbidden), until the access policy becomes active.
384
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-share-acl
382
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-share-acl
385
383
  *
386
384
  * @param shareAcl - Array of signed identifiers, each having a unique Id and details of access policy.
387
385
  * @param option - Options to Share Set Access Policy operation.
@@ -460,7 +458,7 @@ export class ShareClient extends StorageClient {
460
458
  /**
461
459
  * Creates a file permission (a security descriptor) at the share level.
462
460
  * The created security descriptor can be used for the files/directories in the share.
463
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-permission
461
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-permission
464
462
  *
465
463
  * @param options - Options to Share Create Permission operation.
466
464
  * @param filePermission - File permission described in the SDDL
@@ -473,7 +471,7 @@ export class ShareClient extends StorageClient {
473
471
  /**
474
472
  * Gets the Security Descriptor Definition Language (SDDL) for a given file permission key
475
473
  * which indicates a security descriptor.
476
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-permission
474
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-permission
477
475
  *
478
476
  * @param options - Options to Share Create Permission operation.
479
477
  * @param filePermissionKey - File permission key which indicates the security descriptor of the permission.
@@ -498,7 +496,7 @@ export class ShareClient extends StorageClient {
498
496
  * Generates a Service Shared Access Signature (SAS) URI based on the client properties
499
497
  * and parameters passed in. The SAS is signed by the shared key credential of the client.
500
498
  *
501
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
499
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
502
500
  *
503
501
  * @param options - Optional parameters.
504
502
  * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
@@ -516,7 +514,7 @@ export class ShareClient extends StorageClient {
516
514
  * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
517
515
  * and parameters passed in. The SAS is signed by the shared key credential of the client.
518
516
  *
519
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
517
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
520
518
  *
521
519
  * @param options - Optional parameters.
522
520
  * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
@@ -578,7 +576,7 @@ export class ShareDirectoryClient extends StorageClient {
578
576
  }
579
577
  /**
580
578
  * Creates a new directory under the specified share or parent directory.
581
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-directory
579
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory
582
580
  *
583
581
  * @param options - Options to Directory Create operation.
584
582
  * @returns Response data for the Directory operation.
@@ -586,21 +584,20 @@ export class ShareDirectoryClient extends StorageClient {
586
584
  async create(options = {}) {
587
585
  if (!options.fileAttributes) {
588
586
  options = validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions(options);
589
- // By default set it as a directory.
590
- const attributes = new FileSystemAttributes();
591
- attributes.directory = true;
592
- options.fileAttributes = attributes;
593
587
  }
594
588
  return tracingClient.withSpan("ShareDirectoryClient-create", options, async (updatedOptions) => {
595
- return assertResponse(await this.context.create(updatedOptions.fileAttributes
596
- ? fileAttributesToString(updatedOptions.fileAttributes)
597
- : FileAttributesNone, Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime) }), this.shareClientConfig)));
589
+ var _a, _b, _c;
590
+ 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
591
+ ? fileAttributesToString(updatedOptions.fileAttributes)
592
+ : 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));
593
+ const wrappedRes = Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) });
594
+ return assertResponse(wrappedRes);
598
595
  });
599
596
  }
600
597
  /**
601
598
  * Creates a new directory under the specified share or parent directory if it does not already exists.
602
599
  * If the directory already exists, it is not modified.
603
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-directory
600
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory
604
601
  *
605
602
  * @param options -
606
603
  */
@@ -621,7 +618,7 @@ export class ShareDirectoryClient extends StorageClient {
621
618
  }
622
619
  /**
623
620
  * Sets properties on the directory.
624
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-directory-properties
621
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-directory-properties
625
622
  *
626
623
  * @param DirectoryProperties - Directory properties. If no values are provided,
627
624
  * existing values will be preserved.
@@ -629,9 +626,11 @@ export class ShareDirectoryClient extends StorageClient {
629
626
  async setProperties(properties = {}) {
630
627
  properties = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(properties);
631
628
  return tracingClient.withSpan("ShareDirectoryClient-setProperties", properties, async (updatedOptions) => {
632
- return assertResponse(await this.context.setProperties(updatedOptions.fileAttributes
633
- ? fileAttributesToString(updatedOptions.fileAttributes)
634
- : FileAttributesPreserve, Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime) }), this.shareClientConfig)));
629
+ var _a, _b, _c;
630
+ 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
631
+ ? fileAttributesToString(updatedOptions.fileAttributes)
632
+ : 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));
633
+ return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
635
634
  });
636
635
  }
637
636
  /**
@@ -653,7 +652,7 @@ export class ShareDirectoryClient extends StorageClient {
653
652
  }
654
653
  /**
655
654
  * Creates a new subdirectory under this directory.
656
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-directory
655
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory
657
656
  *
658
657
  * @param directoryName -
659
658
  * @param options - Options to Directory Create operation.
@@ -672,7 +671,7 @@ export class ShareDirectoryClient extends StorageClient {
672
671
  /**
673
672
  * Removes the specified empty sub directory under this directory.
674
673
  * Note that the directory must be empty before it can be deleted.
675
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-directory
674
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-directory
676
675
  *
677
676
  * @param directoryName -
678
677
  * @param options - Options to Directory Delete operation.
@@ -686,7 +685,7 @@ export class ShareDirectoryClient extends StorageClient {
686
685
  }
687
686
  /**
688
687
  * Creates a new file or replaces a file under this directory. Note it only initializes the file with no content.
689
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-file
688
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-file
690
689
  *
691
690
  * @param fileName -
692
691
  * @param size - Specifies the maximum size in bytes for the file, up to 4 TB.
@@ -715,7 +714,7 @@ export class ShareDirectoryClient extends StorageClient {
715
714
  * Delete File is not supported on a share snapshot, which is a read-only copy of
716
715
  * a share. An attempt to perform this operation on a share snapshot will fail with 400 (InvalidQueryParameterValue)
717
716
  *
718
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-file2
717
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-file2
719
718
  *
720
719
  * @param fileName - Name of the file to delete
721
720
  * @param options - Options to File Delete operation.
@@ -779,20 +778,21 @@ export class ShareDirectoryClient extends StorageClient {
779
778
  * Returns all system properties for the specified directory, and can also be used to check the
780
779
  * existence of a directory. The data returned does not include the files in the directory or any
781
780
  * subdirectories.
782
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-directory-properties
781
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-directory-properties
783
782
  *
784
783
  * @param options - Options to Directory Get Properties operation.
785
784
  * @returns Response data for the Directory Get Properties operation.
786
785
  */
787
786
  async getProperties(options = {}) {
788
787
  return tracingClient.withSpan("ShareDirectoryClient-getProperties", options, async (updatedOptions) => {
789
- return assertResponse(await this.context.getProperties(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
788
+ const rawResponse = await this.context.getProperties(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig));
789
+ return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
790
790
  });
791
791
  }
792
792
  /**
793
793
  * Removes the specified empty directory. Note that the directory must be empty before it can be
794
794
  * deleted.
795
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-directory
795
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-directory
796
796
  *
797
797
  * @param options - Options to Directory Delete operation.
798
798
  * @returns Response data for the Directory Delete operation.
@@ -805,7 +805,7 @@ export class ShareDirectoryClient extends StorageClient {
805
805
  /**
806
806
  * Removes the specified empty directory if it exists. Note that the directory must be empty before it can be
807
807
  * deleted.
808
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-directory
808
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-directory
809
809
  *
810
810
  * @param options -
811
811
  */
@@ -827,7 +827,7 @@ export class ShareDirectoryClient extends StorageClient {
827
827
  }
828
828
  /**
829
829
  * Updates user defined metadata for the specified directory.
830
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-directory-metadata
830
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-directory-metadata
831
831
  *
832
832
  * @param metadata - If no metadata provided, all existing directory metadata will be removed
833
833
  * @param options - Options to Directory Set Metadata operation.
@@ -1031,7 +1031,7 @@ export class ShareDirectoryClient extends StorageClient {
1031
1031
  /**
1032
1032
  * Returns a list of files or directories under the specified share or directory. It lists the
1033
1033
  * contents only for a single level of the directory hierarchy.
1034
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-directories-and-files
1034
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-directories-and-files
1035
1035
  *
1036
1036
  * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
1037
1037
  * @param options - Options to Directory List Files and Directories Segment operation.
@@ -1201,7 +1201,7 @@ export class ShareDirectoryClient extends StorageClient {
1201
1201
  }
1202
1202
  /**
1203
1203
  * Lists handles for a directory.
1204
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-handles
1204
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-handles
1205
1205
  *
1206
1206
  * @param marker - Optional. A string value that identifies the portion of the list to be
1207
1207
  * returned with the next list handles operation. The operation returns a
@@ -1225,7 +1225,7 @@ export class ShareDirectoryClient extends StorageClient {
1225
1225
  }
1226
1226
  /**
1227
1227
  * Force close all handles for a directory.
1228
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/force-close-handles
1228
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
1229
1229
  *
1230
1230
  * @param marker - Optional. A string value that identifies the position of handles that will
1231
1231
  * be closed with the next force close handles operation.
@@ -1246,7 +1246,7 @@ export class ShareDirectoryClient extends StorageClient {
1246
1246
  }
1247
1247
  /**
1248
1248
  * Force close all handles for a directory.
1249
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/force-close-handles
1249
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
1250
1250
  *
1251
1251
  * @param options -
1252
1252
  */
@@ -1273,7 +1273,7 @@ export class ShareDirectoryClient extends StorageClient {
1273
1273
  }
1274
1274
  /**
1275
1275
  * Force close a specific handle for a directory.
1276
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/force-close-handles
1276
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
1277
1277
  *
1278
1278
  * @param aborter - Create a new Aborter instance with Aborter.none or Aborter.timeout(),
1279
1279
  * goto documents of Aborter for more examples about request cancellation
@@ -1404,7 +1404,7 @@ export class ShareFileClient extends StorageClient {
1404
1404
  }
1405
1405
  /**
1406
1406
  * Creates a new file or replaces a file. Note it only initializes the file with no content.
1407
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-file
1407
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-file
1408
1408
  *
1409
1409
  * @param size - Specifies the maximum size in bytes for the file, up to 4 TB.
1410
1410
  * @param options - Options to File Create operation.
@@ -1431,9 +1431,12 @@ export class ShareFileClient extends StorageClient {
1431
1431
  options = validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions(options);
1432
1432
  options.fileHttpHeaders = options.fileHttpHeaders || {};
1433
1433
  return tracingClient.withSpan("ShareFileClient-create", options, async (updatedOptions) => {
1434
- return assertResponse(await this.context.create(size, updatedOptions.fileAttributes
1435
- ? fileAttributesToString(updatedOptions.fileAttributes)
1436
- : FileAttributesNone, Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime) }), this.shareClientConfig)));
1434
+ var _a, _b, _c, _d;
1435
+ 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
1436
+ ? fileAttributesToString(updatedOptions.fileAttributes)
1437
+ : 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));
1438
+ const wrappedRes = Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) });
1439
+ return assertResponse(wrappedRes);
1437
1440
  });
1438
1441
  }
1439
1442
  /**
@@ -1442,7 +1445,7 @@ export class ShareFileClient extends StorageClient {
1442
1445
  * * In Node.js, data returns in a Readable stream `readableStreamBody`
1443
1446
  * * In browsers, data returns in a promise `contentAsBlob`
1444
1447
  *
1445
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-file
1448
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-file
1446
1449
  *
1447
1450
  * @param offset - From which position of the file to download, greater than or equal to 0
1448
1451
  * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
@@ -1503,9 +1506,10 @@ export class ShareFileClient extends StorageClient {
1503
1506
  throw new RangeError(`rangeGetContentMD5 only works with partial data downloading`);
1504
1507
  }
1505
1508
  const downloadFullFile = offset === 0 && !count;
1506
- const res = assertResponse(await this.context.download(Object.assign(Object.assign(Object.assign({}, updatedOptions), { requestOptions: {
1509
+ const rawResponse = await this.context.download(Object.assign(Object.assign(Object.assign({}, updatedOptions), { requestOptions: {
1507
1510
  onDownloadProgress: isNode ? undefined : updatedOptions.onProgress, // for Node.js, progress is reported by RetriableReadableStream
1508
- }, range: downloadFullFile ? undefined : rangeToString({ offset, count }) }), this.shareClientConfig)));
1511
+ }, range: downloadFullFile ? undefined : rangeToString({ offset, count }) }), this.shareClientConfig));
1512
+ const res = assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
1509
1513
  // Return browser response immediately
1510
1514
  if (!isNode) {
1511
1515
  return res;
@@ -1572,19 +1576,20 @@ export class ShareFileClient extends StorageClient {
1572
1576
  /**
1573
1577
  * Returns all user-defined metadata, standard HTTP properties, and system properties
1574
1578
  * for the file. It does not return the content of the file.
1575
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-file-properties
1579
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-file-properties
1576
1580
  *
1577
1581
  * @param options - Options to File Get Properties operation.
1578
1582
  * @returns Response data for the File Get Properties operation.
1579
1583
  */
1580
1584
  async getProperties(options = {}) {
1581
1585
  return tracingClient.withSpan("ShareFileClient-getProperties", options, async (updatedOptions) => {
1582
- return assertResponse(await this.context.getProperties(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
1586
+ const rawResponse = await this.context.getProperties(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig));
1587
+ return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
1583
1588
  });
1584
1589
  }
1585
1590
  /**
1586
1591
  * Sets properties on the file.
1587
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-file-properties
1592
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-properties
1588
1593
  *
1589
1594
  * @param properties - File properties. For file HTTP headers(e.g. Content-Type),
1590
1595
  * if no values are provided, existing HTTP headers will be removed.
@@ -1595,9 +1600,11 @@ export class ShareFileClient extends StorageClient {
1595
1600
  properties = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(properties);
1596
1601
  properties.fileHttpHeaders = properties.fileHttpHeaders || {};
1597
1602
  return tracingClient.withSpan("ShareFileClient-setProperties", properties, async (updatedOptions) => {
1598
- return assertResponse(await this.context.setHttpHeaders(updatedOptions.fileAttributes
1599
- ? fileAttributesToString(updatedOptions.fileAttributes)
1600
- : FileAttributesPreserve, Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime), fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime) }), this.shareClientConfig)));
1603
+ var _a, _b, _c;
1604
+ 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
1605
+ ? fileAttributesToString(updatedOptions.fileAttributes)
1606
+ : 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));
1607
+ return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
1601
1608
  });
1602
1609
  }
1603
1610
  /**
@@ -1612,7 +1619,7 @@ export class ShareFileClient extends StorageClient {
1612
1619
  * Delete File is not supported on a share snapshot, which is a read-only copy of
1613
1620
  * a share. An attempt to perform this operation on a share snapshot will fail with 400 (InvalidQueryParameterValue)
1614
1621
  *
1615
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-file2
1622
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-file2
1616
1623
  *
1617
1624
  * @param options - Options to File Delete operation.
1618
1625
  * @returns Response data for the File Delete operation.
@@ -1634,7 +1641,7 @@ export class ShareFileClient extends StorageClient {
1634
1641
  * Delete File is not supported on a share snapshot, which is a read-only copy of
1635
1642
  * a share. An attempt to perform this operation on a share snapshot will fail with 400 (InvalidQueryParameterValue)
1636
1643
  *
1637
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-file2
1644
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-file2
1638
1645
  *
1639
1646
  * @param options -
1640
1647
  */
@@ -1659,7 +1666,7 @@ export class ShareFileClient extends StorageClient {
1659
1666
  *
1660
1667
  * If no option provided, or no value provided for the file HTTP headers in the options,
1661
1668
  * these file HTTP headers without a value will be cleared.
1662
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-file-properties
1669
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-properties
1663
1670
  *
1664
1671
  * @param FileHttpHeaders - File HTTP headers like Content-Type.
1665
1672
  * Provide undefined will remove existing HTTP headers.
@@ -1670,15 +1677,17 @@ export class ShareFileClient extends StorageClient {
1670
1677
  // FileAttributes, filePermission, createTime, lastWriteTime will all be preserved
1671
1678
  options = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(options);
1672
1679
  return tracingClient.withSpan("ShareFileClient-setHTTPHeaders", options, async (updatedOptions) => {
1673
- return assertResponse(await this.context.setHttpHeaders(updatedOptions.fileAttributes
1674
- ? fileAttributesToString(updatedOptions.fileAttributes)
1675
- : FileAttributesPreserve, Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileHttpHeaders, fileCreatedOn: fileCreationTimeToString(updatedOptions.creationTime), fileLastWriteOn: fileLastWriteTimeToString(updatedOptions.lastWriteTime), fileChangeOn: fileChangeTimeToString(updatedOptions.changeTime) }), this.shareClientConfig)));
1680
+ var _a, _b, _c;
1681
+ 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
1682
+ ? fileAttributesToString(updatedOptions.fileAttributes)
1683
+ : 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));
1684
+ return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
1676
1685
  });
1677
1686
  }
1678
1687
  /**
1679
1688
  * Resize file.
1680
1689
  *
1681
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-file-properties
1690
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-properties
1682
1691
  *
1683
1692
  * @param length - Resizes a file to the specified size in bytes.
1684
1693
  * If the specified byte value is less than the current size of the file,
@@ -1693,7 +1702,9 @@ export class ShareFileClient extends StorageClient {
1693
1702
  // FileAttributes, filePermission, createTime, lastWriteTime will all be preserved.
1694
1703
  options = validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(options);
1695
1704
  return tracingClient.withSpan("ShareFileClient-resize", options, async (updatedOptions) => {
1696
- return assertResponse(await this.context.setHttpHeaders(fileAttributesToString(updatedOptions.fileAttributes), Object.assign(Object.assign(Object.assign({}, updatedOptions), { fileContentLength: length, fileChangeOn: fileChangeTimeToString(options.changeTime), fileCreatedOn: fileCreationTimeToString(options.creationTime), fileLastWriteOn: fileLastWriteTimeToString(options.lastWriteTime) }), this.shareClientConfig)));
1705
+ var _a, _b, _c;
1706
+ 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));
1707
+ return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
1697
1708
  });
1698
1709
  }
1699
1710
  /**
@@ -1701,7 +1712,7 @@ export class ShareFileClient extends StorageClient {
1701
1712
  *
1702
1713
  * If no metadata defined in the option parameter, the file
1703
1714
  * metadata will be removed.
1704
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-file-metadata
1715
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-metadata
1705
1716
  *
1706
1717
  * @param metadata - If no metadata provided, all existing directory metadata will be removed
1707
1718
  * @param options - Options to File Set Metadata operation.
@@ -1832,13 +1843,14 @@ export class ShareFileClient extends StorageClient {
1832
1843
  */
1833
1844
  async startCopyFromURL(copySource, options = {}) {
1834
1845
  return tracingClient.withSpan("ShareFileClient-startCopyFromURL", options, async (updatedOptions) => {
1835
- return assertResponse(await this.context.startCopy(copySource, Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
1846
+ var _a, _b, _c;
1847
+ 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 })));
1836
1848
  });
1837
1849
  }
1838
1850
  /**
1839
1851
  * Aborts a pending Copy File operation, and leaves a destination file with zero length and full
1840
1852
  * metadata.
1841
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-file
1853
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/abort-copy-file
1842
1854
  *
1843
1855
  * @param copyId - Id of the Copy File operation to abort.
1844
1856
  * @param options - Options to File Abort Copy From URL operation.
@@ -2171,7 +2183,7 @@ export class ShareFileClient extends StorageClient {
2171
2183
  }
2172
2184
  /**
2173
2185
  * Lists handles for a file.
2174
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-handles
2186
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-handles
2175
2187
  *
2176
2188
  * @param marker - Optional. A string value that identifies the portion of the list to be
2177
2189
  * returned with the next list handles operation. The operation returns a
@@ -2281,7 +2293,7 @@ export class ShareFileClient extends StorageClient {
2281
2293
  }
2282
2294
  /**
2283
2295
  * Force close all handles for a file.
2284
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/force-close-handles
2296
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
2285
2297
  *
2286
2298
  * @param marker - Optional. A string value that identifies the position of handles that will
2287
2299
  * be closed with the next force close handles operation.
@@ -2302,7 +2314,7 @@ export class ShareFileClient extends StorageClient {
2302
2314
  }
2303
2315
  /**
2304
2316
  * Force close all handles for a file.
2305
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/force-close-handles
2317
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
2306
2318
  *
2307
2319
  * @param options - Options to force close handles operation.
2308
2320
  */
@@ -2329,7 +2341,7 @@ export class ShareFileClient extends StorageClient {
2329
2341
  }
2330
2342
  /**
2331
2343
  * Force close a specific handle for a file.
2332
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/force-close-handles
2344
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/force-close-handles
2333
2345
  *
2334
2346
  * @param handleId - Specific handle ID, cannot be asterisk "*".
2335
2347
  * Use forceCloseAllHandles() to close all handles.
@@ -2347,6 +2359,18 @@ export class ShareFileClient extends StorageClient {
2347
2359
  return response;
2348
2360
  });
2349
2361
  }
2362
+ /**
2363
+ * NFS only. Creates a hard link to the file file specified by path.
2364
+ * @param targetFile - Path of the file to create the hard link to, not including the share.
2365
+ * For example: "targetDirectory/targetSubDirectory/.../targetFile"
2366
+ * @param options - Options to create hard link operation.
2367
+ */
2368
+ async createHardLink(targetFile, options = {}) {
2369
+ return tracingClient.withSpan("ShareFileClient-createHardLink", options, async (updatedOptions) => {
2370
+ const rawResponse = await this.context.createHardLink(targetFile, Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig));
2371
+ return assertResponse(Object.assign(Object.assign({}, rawResponse), { _response: rawResponse._response, fileMode: parseOctalFileMode(rawResponse.fileMode) }));
2372
+ });
2373
+ }
2350
2374
  /**
2351
2375
  * Get a {@link ShareLeaseClient} that manages leases on the file.
2352
2376
  *
@@ -2362,7 +2386,7 @@ export class ShareFileClient extends StorageClient {
2362
2386
  * Generates a Service Shared Access Signature (SAS) URI based on the client properties
2363
2387
  * and parameters passed in. The SAS is signed by the shared key credential of the client.
2364
2388
  *
2365
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
2389
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
2366
2390
  *
2367
2391
  * @param options - Optional parameters.
2368
2392
  * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
@@ -2380,7 +2404,7 @@ export class ShareFileClient extends StorageClient {
2380
2404
  * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
2381
2405
  * and parameters passed in. The SAS is signed by the shared key credential of the client.
2382
2406
  *
2383
- * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
2407
+ * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
2384
2408
  *
2385
2409
  * @param options - Optional parameters.
2386
2410
  * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
@@ -2450,9 +2474,9 @@ export class ShareFileClient extends StorageClient {
2450
2474
  }
2451
2475
  /**
2452
2476
  * A client that manages leases for a {@link ShareFileClient} or {@link ShareClient}.
2453
- * @see https://docs.microsoft.com/rest/api/storageservices/lease-file
2477
+ * @see https://learn.microsoft.com/rest/api/storageservices/lease-file
2454
2478
  * and
2455
- * @see https://docs.microsoft.com/rest/api/storageservices/lease-share
2479
+ * @see https://learn.microsoft.com/rest/api/storageservices/lease-share
2456
2480
  */
2457
2481
  export class ShareLeaseClient {
2458
2482
  /**