@azure/storage-file-datalake 12.30.0-beta.1 → 12.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/DataLakeFileSystemClient.d.ts +3 -3
- package/dist/browser/DataLakeFileSystemClient.d.ts.map +1 -1
- package/dist/browser/DataLakeFileSystemClient.js +1 -1
- package/dist/browser/DataLakeFileSystemClient.js.map +1 -1
- package/dist/browser/DataLakeServiceClient.d.ts +4 -4
- package/dist/browser/DataLakeServiceClient.d.ts.map +1 -1
- package/dist/browser/DataLakeServiceClient.js +1 -1
- package/dist/browser/DataLakeServiceClient.js.map +1 -1
- package/dist/browser/Pipeline.d.ts +1 -2
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js +1 -2
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/StorageClient.d.ts +1 -2
- package/dist/browser/StorageClient.d.ts.map +1 -1
- package/dist/browser/StorageClient.js.map +1 -1
- package/dist/browser/clients.d.ts +4 -4
- package/dist/browser/clients.d.ts.map +1 -1
- package/dist/browser/clients.js +1 -1
- package/dist/browser/clients.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +1 -1
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/index.d.ts +2 -2
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models.d.ts +14 -2
- package/dist/browser/models.d.ts.map +1 -1
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +1 -1
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/commonjs/DataLakeFileSystemClient.d.ts +3 -3
- package/dist/commonjs/DataLakeFileSystemClient.d.ts.map +1 -1
- package/dist/commonjs/DataLakeFileSystemClient.js +3 -2
- package/dist/commonjs/DataLakeFileSystemClient.js.map +4 -4
- package/dist/commonjs/DataLakeLeaseClient.js +2 -0
- package/dist/commonjs/DataLakeLeaseClient.js.map +2 -2
- package/dist/commonjs/DataLakeServiceClient.d.ts +4 -4
- package/dist/commonjs/DataLakeServiceClient.d.ts.map +1 -1
- package/dist/commonjs/DataLakeServiceClient.js +4 -3
- package/dist/commonjs/DataLakeServiceClient.js.map +4 -4
- package/dist/commonjs/Pipeline.d.ts +1 -2
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +18 -18
- package/dist/commonjs/Pipeline.js.map +4 -4
- package/dist/commonjs/StorageClient.d.ts +1 -2
- package/dist/commonjs/StorageClient.d.ts.map +1 -1
- package/dist/commonjs/StorageClient.js +1 -0
- package/dist/commonjs/StorageClient.js.map +3 -3
- package/dist/commonjs/StorageContextClient.js +1 -0
- package/dist/commonjs/StorageContextClient.js.map +1 -1
- package/dist/commonjs/clients.d.ts +4 -4
- package/dist/commonjs/clients.d.ts.map +1 -1
- package/dist/commonjs/clients.js +6 -5
- package/dist/commonjs/clients.js.map +4 -4
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts +1 -1
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts.map +1 -1
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js +3 -2
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +3 -3
- package/dist/commonjs/generated/src/index.js +1 -0
- package/dist/commonjs/generated/src/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/index.js +1 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +1 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +1 -0
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js +1 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operations/index.js +1 -0
- package/dist/commonjs/generated/src/operations/index.js.map +1 -1
- package/dist/commonjs/generated/src/operations/pathOperations.js +1 -0
- package/dist/commonjs/generated/src/operations/pathOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operations/service.js +1 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.js +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.js +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/service.js +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +2 -1
- package/dist/commonjs/generated/src/storageClient.js.map +2 -2
- package/dist/commonjs/index.d.ts +2 -2
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +14 -13
- package/dist/commonjs/index.js.map +3 -3
- package/dist/commonjs/log.js +1 -0
- package/dist/commonjs/log.js.map +1 -1
- package/dist/commonjs/models.d.ts +14 -2
- package/dist/commonjs/models.d.ts.map +1 -1
- package/dist/commonjs/models.internal.js +1 -0
- package/dist/commonjs/models.internal.js.map +1 -1
- package/dist/commonjs/models.js +1 -0
- package/dist/commonjs/models.js.map +2 -2
- package/dist/commonjs/sas/AccountSASPermissions.js +1 -0
- package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.js +1 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/sas/AccountSASServices.js +1 -0
- package/dist/commonjs/sas/AccountSASServices.js.map +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.js +1 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/DataLakeSASPermissions.js +1 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js +1 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/DirectorySASPermissions.js +1 -0
- package/dist/commonjs/sas/DirectorySASPermissions.js.map +1 -1
- package/dist/commonjs/sas/FileSystemSASPermissions.js +1 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/SASQueryParameters.js +1 -0
- package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/sas/SasIPRange.js +1 -0
- package/dist/commonjs/sas/SasIPRange.js.map +1 -1
- package/dist/commonjs/transforms.js +1 -0
- package/dist/commonjs/transforms.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/Batch.js +1 -0
- package/dist/commonjs/utils/Batch.js.map +1 -1
- package/dist/commonjs/utils/BufferScheduler.js +1 -0
- package/dist/commonjs/utils/BufferScheduler.js.map +1 -1
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js +1 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js.map +1 -1
- package/dist/commonjs/utils/PathClientInternal.js +1 -0
- package/dist/commonjs/utils/PathClientInternal.js.map +1 -1
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +2 -1
- package/dist/commonjs/utils/constants.js.map +2 -2
- package/dist/commonjs/utils/tracing.js +1 -0
- package/dist/commonjs/utils/tracing.js.map +1 -1
- package/dist/commonjs/utils/utils.common.js +1 -0
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/commonjs/utils/utils.d.ts.map +1 -1
- package/dist/commonjs/utils/utils.js +24 -21
- package/dist/commonjs/utils/utils.js.map +3 -3
- package/dist/esm/DataLakeFileSystemClient.d.ts +3 -3
- package/dist/esm/DataLakeFileSystemClient.d.ts.map +1 -1
- package/dist/esm/DataLakeFileSystemClient.js +1 -1
- package/dist/esm/DataLakeFileSystemClient.js.map +1 -1
- package/dist/esm/DataLakeServiceClient.d.ts +4 -4
- package/dist/esm/DataLakeServiceClient.d.ts.map +1 -1
- package/dist/esm/DataLakeServiceClient.js +1 -1
- package/dist/esm/DataLakeServiceClient.js.map +1 -1
- package/dist/esm/Pipeline.d.ts +1 -2
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js +1 -2
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/StorageClient.d.ts +1 -2
- package/dist/esm/StorageClient.d.ts.map +1 -1
- package/dist/esm/StorageClient.js.map +1 -1
- package/dist/esm/clients.d.ts +4 -4
- package/dist/esm/clients.d.ts.map +1 -1
- package/dist/esm/clients.js +1 -1
- package/dist/esm/clients.js.map +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts.map +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.js +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +1 -1
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models.d.ts +14 -2
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.d.ts.map +1 -1
- package/dist/esm/utils/utils.js +31 -22
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/react-native/DataLakeFileSystemClient.d.ts +3 -3
- package/dist/react-native/DataLakeFileSystemClient.d.ts.map +1 -1
- package/dist/react-native/DataLakeFileSystemClient.js +1 -1
- package/dist/react-native/DataLakeFileSystemClient.js.map +1 -1
- package/dist/react-native/DataLakeServiceClient.d.ts +4 -4
- package/dist/react-native/DataLakeServiceClient.d.ts.map +1 -1
- package/dist/react-native/DataLakeServiceClient.js +1 -1
- package/dist/react-native/DataLakeServiceClient.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts +1 -2
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js +1 -2
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/StorageClient.d.ts +1 -2
- package/dist/react-native/StorageClient.d.ts.map +1 -1
- package/dist/react-native/StorageClient.js.map +1 -1
- package/dist/react-native/clients.d.ts +4 -4
- package/dist/react-native/clients.d.ts.map +1 -1
- package/dist/react-native/clients.js +1 -1
- package/dist/react-native/clients.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +1 -1
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/index.d.ts +2 -2
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models.d.ts +14 -2
- package/dist/react-native/models.d.ts.map +1 -1
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +1 -1
- package/dist/react-native/utils/constants.js.map +1 -1
- package/package.json +21 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"12.30.0
|
|
3
|
+
"sources": ["../../../src/utils/constants.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"12.30.0\";\nexport const SERVICE_VERSION: string = \"2026-04-06\";\n\nexport const KB: number = 1024;\nexport const MB: number = KB * 1024;\nexport const GB: number = MB * 1024;\nexport const TB: number = GB * 1024;\n\nexport const DEFAULT_HIGH_LEVEL_CONCURRENCY: number = 5;\nexport const FILE_MAX_SINGLE_UPLOAD_THRESHOLD: number = 100 * MB;\nexport const FILE_UPLOAD_MAX_CHUNK_SIZE: number = 4000 * MB;\nexport const FILE_UPLOAD_DEFAULT_CHUNK_SIZE: number = 8 * MB;\nexport const BLOCK_BLOB_MAX_BLOCKS: number = 50000;\nexport const FILE_MAX_SIZE_BYTES: number = BLOCK_BLOB_MAX_BLOCKS * FILE_UPLOAD_MAX_CHUNK_SIZE;\n\n/**\n * The OAuth scope to use with Azure Storage.\n */\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const StorageDataLakeLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n];\n\nexport const StorageDataLakeLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\",\n];\n\nexport const UrlConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HttpUrlConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\",\n};\n\nexport const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\n\n// Mapping pairs to transform url from dfs endpoint to blob endpoint\n// Customize this value to add more mapping patterns\nexport const ToBlobEndpointHostMappings = [\n [\"dfs.preprod.core.windows.net\", \"blob.preprod.core.windows.net\"],\n [\"dfs.core.windows.net\", \"blob.core.windows.net\"],\n [\"dfs.core.chinacloudapi.cn\", \"blob.core.chinacloudapi.cn\"],\n [\"dfs.core.usgovcloudapi.net\", \"blob.core.usgovcloudapi.net\"],\n [\"dfs.core.cloudapi.de\", \"blob.core.cloudapi.de\"],\n [\"dfs.core.microsoft.scloud\", \"blob.core.microsoft.scloud\"],\n [\"dfs.core.eaglex.ic.gov\", \"blob.core.eaglex.ic.gov\"],\n [\"dfs.storage.azure.net\", \"blob.storage.azure.net\"],\n];\n\n// Mapping pairs to transform url from blob endpoint to dfs endpoint\n// Customize this value to add more mapping patterns\nexport const ToDfsEndpointHostMappings = [\n [\"blob.preprod.core.windows.net\", \"dfs.preprod.core.windows.net\"],\n [\"blob.core.windows.net\", \"dfs.core.windows.net\"],\n [\"blob.core.chinacloudapi.cn\", \"dfs.core.chinacloudapi.cn\"],\n [\"blob.core.usgovcloudapi.net\", \"dfs.core.usgovcloudapi.net\"],\n [\"blob.core.cloudapi.de\", \"dfs.core.cloudapi.de\"],\n [\"blob.core.microsoft.scloud\", \"dfs.core.microsoft.scloud\"],\n [\"blob.core.eaglex.ic.gov\", \"dfs.core.eaglex.ic.gov\"],\n [\"blob.storage.azure.net\", \"dfs.storage.azure.net\"],\n];\n\nexport const ETagAny = \"*\";\n\nexport const DeletionIdKey = \"deletionid\";\nexport const EncryptionAlgorithmAES25 = \"AES256\";\n\nexport const PathResultTypeConstants = {\n FileResourceType: \"file\",\n DirectoryResourceType: \"directory\",\n};\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,cAAsB;AAC5B,MAAM,kBAA0B;AAEhC,MAAM,KAAa;AACnB,MAAM,KAAa,KAAK;AACxB,MAAM,KAAa,KAAK;AACxB,MAAM,KAAa,KAAK;AAExB,MAAM,iCAAyC;AAC/C,MAAM,mCAA2C,MAAM;AACvD,MAAM,6BAAqC,MAAO;AAClD,MAAM,iCAAyC,IAAI;AACnD,MAAM,wBAAgC;AACtC,MAAM,sBAA8B,wBAAwB;AAK5D,MAAM,qBAAwC;AAE9C,MAAM,2CAA2C;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../src/utils/tracing.ts"],
|
|
4
4
|
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\n\n/**\n * Creates a span using the global tracer.\n * @internal\n */\nexport const tracingClient = createTracingClient({\n packageName: \"@azure/storage-file-datalake\",\n packageVersion: SDK_VERSION,\n namespace: \"Microsoft.Storage\",\n});\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAoC;AACpC,uBAA4B;AAMrB,MAAM,oBAAgB,yCAAoB;AAAA,EAC/C,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,WAAW;AACb,CAAC;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../src/utils/utils.common.ts"],
|
|
4
4
|
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { HttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport type { ContainerEncryptionScope, HttpRequestBody, WithResponse } from \"@azure/storage-blob\";\nimport {\n CpkInfo,\n DataLakeGetUserDelegationKeyParameters,\n FileSystemEncryptionScope,\n PathAccessControlItem,\n PathPermissions,\n StorageChecksumAlgorithm,\n} from \"../models.js\";\n\nimport {\n DevelopmentConnectionString,\n EncryptionAlgorithmAES25,\n HeaderConstants,\n PathStylePorts,\n UrlConstants,\n} from \"./constants.js\";\nimport type { HttpResponse } from \"@azure/storage-blob\";\nimport type { HttpHeadersLike } from \"@azure/core-http-compat\";\nimport { toAcl, toPermissions } from \"../transforms.js\";\nimport { PathHttpHeaders } from \"../generated/src/index.js\";\nimport { StorageCRC64Calculator, structuredMessageEncoding } from \"@azure/storage-common\";\n\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XxxClient classes constructors, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" instead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`\n *\n * 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.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @param url -\n */\nexport function escapeURLPath(url: string): string {\n const urlParsed = new URL(url);\n\n let path = urlParsed.pathname;\n path = path || \"/\";\n\n path = escape(path);\n urlParsed.pathname = path;\n\n return urlParsed.toString();\n}\n\nexport interface ConnectionString {\n kind: \"AccountConnString\" | \"SASConnString\";\n url: string;\n accountName: string;\n accountKey?: any;\n accountSas?: string;\n proxyUri?: string; // Development Connection String may contain proxyUri\n}\n\nfunction getProxyUriFromDevConnString(connectionString: string): string {\n // Development Connection String\n // https://learn.microsoft.com/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key\n let proxyUri = \"\";\n if (connectionString.search(\"DevelopmentStorageProxyUri=\") !== -1) {\n // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri\n const matchCredentials = connectionString.split(\";\");\n for (const element of matchCredentials) {\n if (element.trim().startsWith(\"DevelopmentStorageProxyUri=\")) {\n proxyUri = element.trim().match(\"DevelopmentStorageProxyUri=(.*)\")![1];\n }\n }\n }\n return proxyUri;\n}\n\nexport function getValueInConnString(\n connectionString: string,\n argument:\n | \"BlobEndpoint\"\n | \"AccountName\"\n | \"AccountKey\"\n | \"DefaultEndpointsProtocol\"\n | \"EndpointSuffix\"\n | \"SharedAccessSignature\",\n): string {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")![1];\n }\n }\n return \"\";\n}\n\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @param connectionString - Connection string.\n * @returns String key value pairs of the storage account's url and credentials.\n */\nexport function extractConnectionStringParts(connectionString: string): ConnectionString {\n let proxyUri = \"\";\n\n if (connectionString.startsWith(\"UseDevelopmentStorage=true\")) {\n // Development connection string\n proxyUri = getProxyUriFromDevConnString(connectionString);\n connectionString = DevelopmentConnectionString;\n }\n\n // Matching BlobEndpoint in the Account connection string\n let blobEndpoint = getValueInConnString(connectionString, \"BlobEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n blobEndpoint = blobEndpoint.endsWith(\"/\") ? blobEndpoint.slice(0, -1) : blobEndpoint;\n\n if (\n connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1\n ) {\n // Account connection string\n\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n\n if (!blobEndpoint) {\n // BlobEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`\n\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol!.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\n \"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\",\n );\n }\n\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n }\n\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n } else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n\n return {\n kind: \"AccountConnString\",\n url: blobEndpoint,\n accountName,\n accountKey,\n proxyUri,\n };\n } else {\n // SAS connection string\n\n const accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n let accountName = getValueInConnString(connectionString, \"AccountName\");\n // if accountName is empty, try to read it from BlobEndpoint\n if (!accountName) {\n accountName = getAccountNameFromUrl(blobEndpoint);\n }\n if (!blobEndpoint) {\n throw new Error(\"Invalid BlobEndpoint in the provided SAS Connection String\");\n } else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n\n return { kind: \"SASConnString\", url: blobEndpoint, accountName, accountSas };\n }\n}\n\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param text -\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nfunction escape(text: string): string {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @param url - Source URL string\n * @param name - String to be appended to URL\n * @returns An updated URL string\n */\nexport function appendToURLPath(url: string, name: string): string {\n const urlParsed = new URL(url);\n\n let path = urlParsed.pathname;\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.pathname = path;\n\n return urlParsed.toString();\n}\n\n/**\n * Append a string to URL query.\n *\n * @param url - Source URL string.\n * @param queryParts - String to be appended to the URL query.\n * @returns An updated URL string.\n */\nexport function appendToURLQuery(url: string, queryParts: string): string {\n const urlParsed = new URL(url);\n\n let query = urlParsed.search;\n if (query) {\n query += \"&\" + queryParts;\n } else {\n query = queryParts;\n }\n\n urlParsed.search = query;\n return urlParsed.toString();\n}\n\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @param url - Source URL string\n * @param name - Parameter name\n * @param value - Parameter value\n * @returns An updated URL string\n */\nexport function setURLParameter(url: string, name: string, value?: string): string {\n const urlParsed = new URL(url);\n const encodedName = encodeURIComponent(name);\n const encodedValue = value ? encodeURIComponent(value) : undefined;\n // mutating searchParams will change the encoding, so we have to do this ourselves\n const searchString = urlParsed.search === \"\" ? \"?\" : urlParsed.search;\n\n const searchPieces: string[] = [];\n\n for (const pair of searchString.slice(1).split(\"&\")) {\n if (pair) {\n const [key] = pair.split(\"=\", 2);\n if (key !== encodedName) {\n searchPieces.push(pair);\n }\n }\n }\n if (encodedValue) {\n searchPieces.push(`${encodedName}=${encodedValue}`);\n }\n\n urlParsed.search = searchPieces.length ? `?${searchPieces.join(\"&\")}` : \"\";\n\n return urlParsed.toString();\n}\n\n/**\n * Get URL parameter by name.\n *\n * @param url -\n * @param name -\n */\nexport function getURLParameter(url: string, name: string): string | string[] | undefined {\n const urlParsed = new URL(url);\n return urlParsed.searchParams.get(name) ?? undefined;\n}\n\n/**\n * Set URL host.\n *\n * @param url - Source URL string\n * @param host - New host string\n * @returns An updated URL string\n */\nexport function setURLHost(url: string, host: string): string {\n const urlParsed = new URL(url);\n urlParsed.hostname = host;\n return urlParsed.toString();\n}\n\n/**\n * Get URL path from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLPath(url: string): string | undefined {\n try {\n const urlParsed = new URL(url);\n return urlParsed.pathname;\n } catch (e) {\n return undefined;\n }\n}\n\n/**\n * Set URL path.\n *\n * @param url -\n * @param path -\n */\nexport function setURLPath(url: string, path: string): string {\n const urlParsed = new URL(url);\n urlParsed.pathname = path;\n return urlParsed.toString();\n}\n\n/**\n * Get URL scheme from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLScheme(url: string): string | undefined {\n try {\n const urlParsed = new URL(url);\n return urlParsed.protocol.endsWith(\":\") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol;\n } catch (e) {\n return undefined;\n }\n}\n\n/**\n * Get URL path and query from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLPathAndQuery(url: string): string | undefined {\n const urlParsed = new URL(url);\n const pathString = urlParsed.pathname;\n if (!pathString) {\n throw new RangeError(\"Invalid url without valid path.\");\n }\n\n let queryString = urlParsed.search || \"\";\n queryString = queryString.trim();\n if (queryString !== \"\") {\n queryString = queryString.startsWith(\"?\") ? queryString : `?${queryString}`; // Ensure query string start with '?'\n }\n\n return `${pathString}${queryString}`;\n}\n\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @param url -\n */\nexport function getURLQueries(url: string): { [key: string]: string } {\n let queryString = new URL(url).search;\n if (!queryString) {\n return {};\n }\n\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substring(1) : queryString;\n\n let querySubStrings: string[] = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value: string) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (\n indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1\n );\n });\n\n const queries: { [key: string]: string } = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key: string = splitResults[0];\n const value: string = splitResults[1];\n queries[key] = value;\n }\n\n return queries;\n}\n\n/**\n * Set URL query string.\n *\n * @param url -\n * @param queryString -\n */\nexport function setURLQueries(url: string, queryString: string): string {\n const urlParsed = new URL(url);\n urlParsed.search = queryString;\n return urlParsed.toString();\n}\n\n/**\n * Rounds a date off to seconds.\n *\n * @param date -\n * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns Date string in ISO8061 format, with or without 7 milliseconds component\n */\nexport function truncatedISO8061Date(date: Date, withMilliseconds: boolean = true): string {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n\n/**\n * Base64 encode.\n *\n * @param content -\n */\nexport function base64encode(content: string): string {\n return !isNodeLike ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n\n/**\n * Base64 decode.\n *\n * @param encodedString -\n */\nexport function base64decode(encodedString: string): string {\n return !isNodeLike ? atob(encodedString) : Buffer.from(encodedString, \"base64\").toString();\n}\n\n/**\n * Generate a 64 bytes base64 block ID string.\n *\n * @param blockIndex -\n */\nexport function generateBlockID(blockIDPrefix: string, blockIndex: number): string {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res =\n blockIDPrefix +\n blockIndex.toString().padStart(maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}\n\nexport function sanitizeURL(url: string): string {\n let safeURL: string = url;\n if (getURLParameter(safeURL, UrlConstants.Parameters.SIGNATURE)) {\n safeURL = setURLParameter(safeURL, UrlConstants.Parameters.SIGNATURE, \"*****\");\n }\n\n return safeURL;\n}\n\nexport function sanitizeHeaders(originalHeader: HttpHeaders): HttpHeaders {\n const headers: HttpHeaders = createHttpHeaders();\n for (const [name, value] of originalHeader) {\n if (name.toLowerCase() === HeaderConstants.AUTHORIZATION.toLowerCase()) {\n headers.set(name, \"*****\");\n } else if (name.toLowerCase() === HeaderConstants.X_MS_COPY_SOURCE) {\n headers.set(name, sanitizeURL(value));\n } else {\n headers.set(name, value);\n }\n }\n\n return headers;\n}\n/**\n * If two strings are equal when compared case insensitive.\n *\n * @param str1 -\n * @param str2 -\n */\nexport function iEqual(str1: string, str2: string): boolean {\n return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();\n}\n\n/**\n * Extracts account name from the url\n * @param url - url to extract the account name from\n * @returns with the account name\n */\nexport function getAccountNameFromUrl(url: string): string {\n const parsedUrl = new URL(url);\n let accountName;\n try {\n if (parsedUrl.hostname.split(\".\")[1] === \"blob\") {\n // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n accountName = parsedUrl.hostname.split(\".\")[0];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.pathname.split(\"/\")[1];\n } else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n return accountName;\n } catch (error: any) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\n\nexport function isIpEndpointStyle(parsedUrl: URL): boolean {\n const host = parsedUrl.host;\n\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n return (\n /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])){3}(:[0-9]+)?$/.test(\n host,\n ) ||\n (Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port))\n );\n}\n\n/**\n * This is to convert a Windows File Time ticks to a Date object.\n */\nexport function windowsFileTimeTicksToTime(timeNumber: string | undefined): Date | undefined {\n if (!timeNumber) return undefined;\n // A windows file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed\n // since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).\n // JS Date accepts a value that represents milliseconds from 12:00 A.M. January 1, 1970\n // So, we'll handle the calculations in milliseconds from here\n\n // Time in milliseconds since \"12:00 A.M. January 1, 1601\"\n const timeElapsed = parseInt(timeNumber) / 10000;\n\n if (timeElapsed === 0) return undefined;\n\n // Reference - https://stackoverflow.com/a/24188106/4137356\n\n // Milliseconds calculated relative to \"12:00 A.M. January 1, 1970\" (will be negative)\n const initialFrameOfReference = Date.UTC(1601, 0, 1);\n\n // TimeRelativeTo1970 = (TimeAt1601 - TimeAt1970) + (Current - TimeAt1601) = (Current - TimeAt1970)\n return new Date(initialFrameOfReference + timeElapsed);\n}\n\nexport function ensureCpkIfSpecified(cpk: CpkInfo | undefined, isHttps: boolean): void {\n if (cpk && !isHttps) {\n throw new RangeError(\"Customer-provided encryption key must be used over HTTPS.\");\n }\n\n if (cpk && !cpk.encryptionAlgorithm) {\n cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;\n }\n}\n\nexport function ToBlobContainerEncryptionScope(\n fileSystemEncryptionScope?: FileSystemEncryptionScope,\n): ContainerEncryptionScope | undefined {\n if (!fileSystemEncryptionScope) return undefined;\n\n if (!fileSystemEncryptionScope.defaultEncryptionScope) return undefined;\n\n return {\n defaultEncryptionScope: fileSystemEncryptionScope.defaultEncryptionScope,\n preventEncryptionScopeOverride: true,\n };\n}\n\n/**\n * Escape the file or directory name but keep path separator ('/').\n */\nexport function EscapePath(pathName: string): string {\n const split = pathName.split(\"/\");\n for (let i = 0; i < split.length; i++) {\n split[i] = encodeURIComponent(split[i]);\n }\n return split.join(\"/\");\n}\n\n/**\n * A typesafe helper for ensuring that a given response object has\n * the original _response attached.\n * @param response - A response object from calling a client operation\n * @returns The same object, but with known _response property\n */\nexport function assertResponse<T extends object, Headers = undefined, Body = undefined>(\n response: T,\n): WithResponse<T, Headers, Body> {\n if (`_response` in response) {\n return response as WithResponse<T, Headers, Body>;\n }\n\n throw new TypeError(`Unexpected response object ${response}`);\n}\n\nexport interface PathGetPropertiesRawResponseWithExtraPropertiesLike {\n encryptionContext?: string;\n owner?: string;\n group?: string;\n permissions?: PathPermissions;\n acl: PathAccessControlItem[];\n _response: HttpResponse & {\n parsedHeaders: {\n encryptionContext?: string;\n owner?: string;\n group?: string;\n permissions?: PathPermissions;\n acl: PathAccessControlItem[];\n };\n };\n}\n\nfunction ParseHeaderValue(\n rawResponse: PathGetPropertiesRawResponseWithExtraPropertiesLike,\n headerName: string,\n): string | undefined {\n if (rawResponse._response) {\n const headers = rawResponse._response.headers as HttpHeadersLike;\n if (headers) {\n return headers.get(headerName);\n }\n }\n\n return undefined;\n}\n\n/**\n * Parse extra properties values from headers in raw response.\n */\nexport function ParsePathGetPropertiesExtraHeaderValues(\n rawResponse: PathGetPropertiesRawResponseWithExtraPropertiesLike,\n): PathGetPropertiesRawResponseWithExtraPropertiesLike {\n const response = rawResponse;\n response.encryptionContext = ParseHeaderValue(rawResponse, \"x-ms-encryption-context\");\n response.owner = ParseHeaderValue(rawResponse, \"x-ms-owner\");\n response.group = ParseHeaderValue(rawResponse, \"x-ms-group\");\n response.permissions = toPermissions(ParseHeaderValue(rawResponse, \"x-ms-permissions\"));\n response.acl = toAcl(ParseHeaderValue(rawResponse, \"x-ms-acl\"));\n if (response._response?.parsedHeaders) {\n response._response.parsedHeaders.encryptionContext = response.encryptionContext;\n response._response.parsedHeaders.owner = response.owner;\n response._response.parsedHeaders.group = response.group;\n response._response.parsedHeaders.permissions = response.permissions;\n response._response.parsedHeaders.acl = response.acl;\n }\n return response;\n}\n\ninterface UploadChecksumParametersLike {\n /** Parameter group */\n pathHttpHeaders?: PathHttpHeaders;\n transactionalContentCrc64?: Uint8Array;\n contentChecksumAlgorithm?: StorageChecksumAlgorithm;\n structuredBodyType?: string;\n structuredContentLength?: number;\n}\n\ninterface UploadChecksumOptionsLike {\n transactionalContentMD5?: Uint8Array;\n transactionalContentCrc64?: Uint8Array;\n contentChecksumAlgorithm?: StorageChecksumAlgorithm;\n structuredBodyType?: string;\n structuredContentLength?: number;\n}\n\ninterface UploadCheckSumBody {\n contentChecksumAlgorithm?: StorageChecksumAlgorithm;\n body: HttpRequestBody;\n contentLength: number;\n}\n\nexport async function setUploadChecksumParameters(\n body: HttpRequestBody,\n contentLength: number,\n parameters: UploadChecksumParametersLike,\n uploadOptions: UploadChecksumOptionsLike,\n configContentChecksumAlgorithm?: StorageChecksumAlgorithm,\n): Promise<UploadCheckSumBody> {\n let contentChecksumAlgorithm =\n uploadOptions.contentChecksumAlgorithm ?? configContentChecksumAlgorithm;\n if (contentChecksumAlgorithm === undefined) {\n contentChecksumAlgorithm = \"Customized\";\n }\n\n if (contentChecksumAlgorithm === \"Auto\") {\n contentChecksumAlgorithm = \"StorageCrc64\";\n }\n\n let bodyInfo = undefined;\n if (contentChecksumAlgorithm === \"Customized\") {\n if (parameters.pathHttpHeaders === undefined) {\n parameters.pathHttpHeaders = {\n contentMD5: uploadOptions.transactionalContentMD5,\n };\n } else {\n parameters.pathHttpHeaders.transactionalContentHash = uploadOptions.transactionalContentMD5;\n (parameters as any).transactionalContentHash = uploadOptions.transactionalContentMD5;\n }\n parameters.transactionalContentCrc64 = uploadOptions.transactionalContentCrc64;\n } else if (contentChecksumAlgorithm === \"StorageCrc64\") {\n await StorageCRC64Calculator.init();\n bodyInfo = await structuredMessageEncoding(body, contentLength);\n parameters.structuredBodyType = \"XSM/1.0; properties=crc64\";\n parameters.structuredContentLength = contentLength;\n }\n\n return {\n body: contentChecksumAlgorithm === \"StorageCrc64\" ? bodyInfo!.body : body,\n contentLength:\n contentChecksumAlgorithm === \"StorageCrc64\" ? bodyInfo!.encodedContentLength : contentLength,\n contentChecksumAlgorithm: contentChecksumAlgorithm,\n };\n}\n\nexport function isDataLakeGetUserDelegationKeyParameters(\n parameter: unknown,\n): parameter is DataLakeGetUserDelegationKeyParameters {\n if (!parameter || typeof parameter !== \"object\") {\n return false;\n }\n\n const castParameter = parameter as DataLakeGetUserDelegationKeyParameters;\n\n return castParameter.expiresOn instanceof Date;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,gCAAkC;AAClC,uBAA2B;AAW3B,uBAMO;AAGP,wBAAqC;AAErC,4BAAkE;AAsD3D,SAAS,cAAc,KAAqB;AACjD,QAAM,YAAY,IAAI,IAAI,GAAG;AAE7B,MAAI,OAAO,UAAU;AACrB,SAAO,QAAQ;AAEf,SAAO,OAAO,IAAI;A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ClC,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,SAAS,CAAC;AAGzB;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,IAAI,CAAC,CA8Cf;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,8BAA0B,CAAC;AAE9C,eAAO,MAAM,kBAAkB,4BAAsB,CAAC"}
|
|
@@ -44,16 +44,19 @@ async function streamToBuffer(stream, buffer, offset, end, encoding) {
|
|
|
44
44
|
resolve();
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
let chunk
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
let chunk;
|
|
48
|
+
while ((chunk = stream.read()) !== null) {
|
|
49
|
+
if (typeof chunk === "string") {
|
|
50
|
+
chunk = Buffer.from(chunk, encoding);
|
|
51
|
+
}
|
|
52
|
+
const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;
|
|
53
|
+
buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);
|
|
54
|
+
pos += chunkLength;
|
|
55
|
+
if (pos >= count) {
|
|
56
|
+
resolve();
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
53
59
|
}
|
|
54
|
-
const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;
|
|
55
|
-
buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);
|
|
56
|
-
pos += chunkLength;
|
|
57
60
|
});
|
|
58
61
|
stream.on("end", () => {
|
|
59
62
|
if (pos < count) {
|
|
@@ -73,19 +76,18 @@ async function streamToBuffer2(stream, buffer, encoding) {
|
|
|
73
76
|
const bufferSize = buffer.length;
|
|
74
77
|
return new Promise((resolve, reject) => {
|
|
75
78
|
stream.on("readable", () => {
|
|
76
|
-
let chunk
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
let chunk;
|
|
80
|
+
while ((chunk = stream.read()) !== null) {
|
|
81
|
+
if (typeof chunk === "string") {
|
|
82
|
+
chunk = Buffer.from(chunk, encoding);
|
|
83
|
+
}
|
|
84
|
+
if (pos + chunk.length > bufferSize) {
|
|
85
|
+
reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`));
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
buffer.fill(chunk, pos, pos + chunk.length);
|
|
89
|
+
pos += chunk.length;
|
|
86
90
|
}
|
|
87
|
-
buffer.fill(chunk, pos, pos + chunk.length);
|
|
88
|
-
pos += chunk.length;
|
|
89
91
|
});
|
|
90
92
|
stream.on("end", () => {
|
|
91
93
|
resolve(pos);
|
|
@@ -102,3 +104,4 @@ const fsCreateReadStream = import_node_fs.default.createReadStream;
|
|
|
102
104
|
streamToBuffer,
|
|
103
105
|
streamToBuffer2
|
|
104
106
|
});
|
|
107
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport fs from \"node:fs\";\nimport util from \"node:util\";\n\n/**\n * Reads a readable stream into buffer. Fill the buffer from offset to end.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param offset - From which position in the buffer to be filled, inclusive\n * @param end - To which position in the buffer to be filled, exclusive\n * @param encoding - Encoding of the Readable stream\n */\nexport async function streamToBuffer(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n offset: number,\n end: number,\n encoding?: BufferEncoding,\n): Promise<void> {\n let pos = 0; // Position in stream\n const count = end - offset; // Total amount of data needed in stream\n\n return new Promise<void>((resolve, reject) => {\n stream.on(\"readable\", () => {\n if (pos >= count) {\n resolve();\n return;\n }\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAe;AACf,uBAAiB;AAWjB,eAAsB,eACpB,QACA,QACA,QACA,KACA,UACe;AACf,MAAI,MAAM;AACV,QAAM,QAAQ,MAAM;AAEpB,SAAO,IAAI,QAAc,CAAC,SAAS,WAAW;AAC5C,WAAO,GAAG,YAAY,MAAM;
|
|
3
|
+
"sources": ["../../../src/utils/utils.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport fs from \"node:fs\";\nimport util from \"node:util\";\n\n/**\n * Reads a readable stream into buffer. Fill the buffer from offset to end.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param offset - From which position in the buffer to be filled, inclusive\n * @param end - To which position in the buffer to be filled, exclusive\n * @param encoding - Encoding of the Readable stream\n */\nexport async function streamToBuffer(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n offset: number,\n end: number,\n encoding?: BufferEncoding,\n): Promise<void> {\n let pos = 0; // Position in stream\n const count = end - offset; // Total amount of data needed in stream\n\n return new Promise<void>((resolve, reject) => {\n stream.on(\"readable\", () => {\n // Already filled the requested amount; ignore any further `readable` events.\n if (pos >= count) {\n resolve();\n return;\n }\n // Drain all currently-buffered chunks. Required since Node.js v26, where\n // `stream.read()` returns one buffered chunk at a time instead of the\n // concatenation of all queued data (see nodejs/node#60441).\n let chunk: string | Buffer | null;\n while ((chunk = stream.read()) !== null) {\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n\n // How much data needed in this chunk\n const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;\n\n buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);\n pos += chunkLength;\n\n if (pos >= count) {\n resolve();\n return;\n }\n }\n });\n\n stream.on(\"end\", () => {\n if (pos < count) {\n reject(\n new Error(\n `Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`,\n ),\n );\n }\n resolve();\n });\n\n stream.on(\"error\", reject);\n });\n}\n\n/**\n * Reads a readable stream into buffer entirely.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param encoding - Encoding of the Readable stream\n * @returns with the count of bytes read.\n * @throws `RangeError` If buffer size is not big enough.\n */\nexport async function streamToBuffer2(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n encoding?: BufferEncoding,\n): Promise<number> {\n let pos = 0; // Position in stream\n const bufferSize = buffer.length;\n\n return new Promise<number>((resolve, reject) => {\n stream.on(\"readable\", () => {\n // Drain all currently-buffered chunks. Required since Node.js v26, where\n // `stream.read()` returns one buffered chunk at a time instead of the\n // concatenation of all queued data (see nodejs/node#60441).\n let chunk: string | Buffer | null;\n while ((chunk = stream.read()) !== null) {\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n\n if (pos + chunk.length > bufferSize) {\n reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`));\n return;\n }\n\n buffer.fill(chunk, pos, pos + chunk.length);\n pos += chunk.length;\n }\n });\n\n stream.on(\"end\", () => {\n resolve(pos);\n });\n\n stream.on(\"error\", reject);\n });\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Promisified version of fs.stat().\n */\nexport const fsStat = util.promisify(fs.stat);\n\nexport const fsCreateReadStream = fs.createReadStream;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAe;AACf,uBAAiB;AAWjB,eAAsB,eACpB,QACA,QACA,QACA,KACA,UACe;AACf,MAAI,MAAM;AACV,QAAM,QAAQ,MAAM;AAEpB,SAAO,IAAI,QAAc,CAAC,SAAS,WAAW;AAC5C,WAAO,GAAG,YAAY,MAAM;AAE1B,UAAI,OAAO,OAAO;AAChB,gBAAQ;AACR;AAAA,MACF;AAIA,UAAI;AACJ,cAAQ,QAAQ,OAAO,KAAK,OAAO,MAAM;AACvC,YAAI,OAAO,UAAU,UAAU;AAC7B,kBAAQ,OAAO,KAAK,OAAO,QAAQ;AAAA,QACrC;AAGA,cAAM,cAAc,MAAM,MAAM,SAAS,QAAQ,QAAQ,MAAM,MAAM;AAErE,eAAO,KAAK,MAAM,MAAM,GAAG,WAAW,GAAG,SAAS,KAAK,SAAS,MAAM,WAAW;AACjF,eAAO;AAEP,YAAI,OAAO,OAAO;AAChB,kBAAQ;AACR;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAED,WAAO,GAAG,OAAO,MAAM;AACrB,UAAI,MAAM,OAAO;AACf;AAAA,UACE,IAAI;AAAA,YACF,+DAA+D,GAAG,gBAAgB,KAAK;AAAA,UACzF;AAAA,QACF;AAAA,MACF;AACA,cAAQ;AAAA,IACV,CAAC;AAED,WAAO,GAAG,SAAS,MAAM;AAAA,EAC3B,CAAC;AACH;AAWA,eAAsB,gBACpB,QACA,QACA,UACiB;AACjB,MAAI,MAAM;AACV,QAAM,aAAa,OAAO;AAE1B,SAAO,IAAI,QAAgB,CAAC,SAAS,WAAW;AAC9C,WAAO,GAAG,YAAY,MAAM;AAI1B,UAAI;AACJ,cAAQ,QAAQ,OAAO,KAAK,OAAO,MAAM;AACvC,YAAI,OAAO,UAAU,UAAU;AAC7B,kBAAQ,OAAO,KAAK,OAAO,QAAQ;AAAA,QACrC;AAEA,YAAI,MAAM,MAAM,SAAS,YAAY;AACnC,iBAAO,IAAI,MAAM,4CAA4C,UAAU,EAAE,CAAC;AAC1E;AAAA,QACF;AAEA,eAAO,KAAK,OAAO,KAAK,MAAM,MAAM,MAAM;AAC1C,eAAO,MAAM;AAAA,MACf;AAAA,IACF,CAAC;AAED,WAAO,GAAG,OAAO,MAAM;AACrB,cAAQ,GAAG;AAAA,IACb,CAAC;AAED,WAAO,GAAG,SAAS,MAAM;AAAA,EAC3B,CAAC;AACH;AAOO,MAAM,SAAS,iBAAAA,QAAK,UAAU,eAAAC,QAAG,IAAI;AAErC,MAAM,qBAAqB,eAAAA,QAAG;",
|
|
6
6
|
"names": ["util", "fs"]
|
|
7
7
|
}
|
|
@@ -2,9 +2,9 @@ import type { TokenCredential } from "@azure/core-auth";
|
|
|
2
2
|
import type { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
3
3
|
import type { Pipeline } from "./Pipeline.js";
|
|
4
4
|
import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential.js";
|
|
5
|
-
import { AnonymousCredential } from "@azure/storage-
|
|
5
|
+
import { AnonymousCredential } from "@azure/storage-common";
|
|
6
6
|
import { DataLakeLeaseClient } from "./DataLakeLeaseClient.js";
|
|
7
|
-
import type { AccessPolicy, FileSystemCreateOptions, FileSystemCreateResponse, FileSystemDeleteOptions, FileSystemDeleteResponse, FileSystemExistsOptions, FileSystemGetAccessPolicyOptions, FileSystemGetAccessPolicyResponse, FileSystemGetPropertiesOptions, FileSystemGetPropertiesResponse, FileSystemSetAccessPolicyOptions, FileSystemSetAccessPolicyResponse, FileSystemSetMetadataOptions, FileSystemSetMetadataResponse, ListPathsOptions, Metadata, Path, PublicAccessType, SignedIdentifier, FileSystemListPathsResponse, FileSystemCreateIfNotExistsResponse, FileSystemDeleteIfExistsResponse, FileSystemGenerateSasUrlOptions, FileSystemListDeletedPathsResponse, ListDeletedPathsOptions, DeletedPath, FileSystemUndeletePathResponse, FileSystemUndeletePathOption,
|
|
7
|
+
import type { AccessPolicy, FileSystemCreateOptions, FileSystemCreateResponse, FileSystemDeleteOptions, FileSystemDeleteResponse, FileSystemExistsOptions, FileSystemGetAccessPolicyOptions, FileSystemGetAccessPolicyResponse, FileSystemGetPropertiesOptions, FileSystemGetPropertiesResponse, FileSystemSetAccessPolicyOptions, FileSystemSetAccessPolicyResponse, FileSystemSetMetadataOptions, FileSystemSetMetadataResponse, ListPathsOptions, Metadata, Path, PublicAccessType, SignedIdentifier, FileSystemListPathsResponse, FileSystemCreateIfNotExistsResponse, FileSystemDeleteIfExistsResponse, FileSystemGenerateSasUrlOptions, FileSystemListDeletedPathsResponse, ListDeletedPathsOptions, DeletedPath, FileSystemUndeletePathResponse, FileSystemUndeletePathOption, DataLakeClientConfig, DataLakeFileSystemClientOptions } from "./models.js";
|
|
8
8
|
import { StorageClient } from "./StorageClient.js";
|
|
9
9
|
import { DataLakeFileClient, DataLakeDirectoryClient } from "./clients.js";
|
|
10
10
|
import type { UserDelegationKey } from "@azure/storage-common";
|
|
@@ -34,7 +34,7 @@ export declare class DataLakeFileSystemClient extends StorageClient {
|
|
|
34
34
|
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
|
|
35
35
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
|
36
36
|
*/
|
|
37
|
-
constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?:
|
|
37
|
+
constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: DataLakeFileSystemClientOptions);
|
|
38
38
|
/**
|
|
39
39
|
* Creates an instance of DataLakeFileSystemClient from url and pipeline.
|
|
40
40
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataLakeFileSystemClient.d.ts","sourceRoot":"","sources":["../../src/DataLakeFileSystemClient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAEnF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DataLakeFileSystemClient.d.ts","sourceRoot":"","sources":["../../src/DataLakeFileSystemClient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAEnF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,KAAK,EACV,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,gCAAgC,EAChC,iCAAiC,EACjC,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,EAChC,iCAAiC,EACjC,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAEhB,QAAQ,EACR,IAAI,EACJ,gBAAgB,EAChB,gB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,gBAAgB,CACrB,OAAO,GAAE,uBAA4B,GACpC,0BAA0B,CAAC,WAAW,EAAE,kCAAkC,CAAC;YAiB/D,gBAAgB;YAQhB,mBAAmB;YAcpB,uBAAuB;IAkCrC;;;;;;;;;OASG;IAEU,YAAY,CACvB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,8BAA8B,CAAC;IAiC1C;;;;;;;;;;OAUG;IACI,cAAc,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBhF;;;;;;;;;;OAUG;IAEI,uBAAuB,CAAC,OAAO,EAAE,+BAA+B,GAAG,MAAM;IAgBhF;;;;;;;;;OASG;IACI,4BAA4B,CACjC,OAAO,EAAE,+BAA+B,EACxC,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAAC,MAAM,CAAC;IAelB;;;;;;;;;OASG;IAEI,qCAAqC,CAC1C,OAAO,EAAE,+BAA+B,EACxC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM;CAUV"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContainerClient } from "@azure/storage-blob";
|
|
2
2
|
import { isPipelineLike, newPipeline } from "./Pipeline.js";
|
|
3
3
|
import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential.js";
|
|
4
|
-
import { AnonymousCredential } from "@azure/storage-
|
|
4
|
+
import { AnonymousCredential } from "@azure/storage-common";
|
|
5
5
|
import { DataLakeLeaseClient } from "./DataLakeLeaseClient.js";
|
|
6
6
|
import { FileSystemOperationsImpl as FileSystem } from "./generated/src/operations/index.js";
|
|
7
7
|
import { StorageClient } from "./StorageClient.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataLakeFileSystemClient.js","sourceRoot":"","sources":["../../src/DataLakeFileSystemClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAA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AAU,YAAY,0BAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,uFAAuF,CACxF,CAAC;QACJ,CAAC;QAED,OAAO,0CAA0C,CAC/C;YACE,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,GAAG,OAAO;SACX,EACD,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;IAED;;;;;;;;;OASG;IACI,4BAA4B,CACjC,OAAwC,EACxC,iBAAoC;QAEpC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,GAAG,GAAG,kCAAkC,CAC5C;gBACE,cAAc,EAAE,IAAI,CAAC,IAAI;gBACzB,GAAG,OAAO;aACX,EACD,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,QAAQ,EAAE,CAAC;YAEb,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IAEI,qCAAqC,CAC1C,OAAwC,EACxC,iBAAoC;QAEpC,OAAO,0CAA0C,CAC/C;YACE,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,GAAG,OAAO;SACX,EACD,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ContainerClient } from \"@azure/storage-blob\";\nimport type { Pipeline } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { DataLakeLeaseClient } from \"./DataLakeLeaseClient.js\";\nimport { FileSystemOperationsImpl as FileSystem } from \"./generated/src/operations/index.js\";\nimport type {\n AccessPolicy,\n FileSystemCreateOptions,\n FileSystemCreateResponse,\n FileSystemDeleteOptions,\n FileSystemDeleteResponse,\n FileSystemExistsOptions,\n FileSystemGetAccessPolicyOptions,\n FileSystemGetAccessPolicyResponse,\n FileSystemGetPropertiesOptions,\n FileSystemGetPropertiesResponse,\n FileSystemSetAccessPolicyOptions,\n FileSystemSetAccessPolicyResponse,\n FileSystemSetMetadataOptions,\n FileSystemSetMetadataResponse,\n ListPathsOptions,\n ListPathsSegmentOptions,\n Metadata,\n Path,\n PublicAccessType,\n SignedIdentifier,\n FileSystemListPathsResponse,\n FileSystemCreateIfNotExistsResponse,\n FileSystemDeleteIfExistsResponse,\n FileSystemGenerateSasUrlOptions,\n FileSystemListDeletedPathsResponse,\n ListDeletedPathsOptions,\n DeletedPath,\n FileSystemUndeletePathResponse,\n FileSystemUndeletePathOption,\n ListDeletedPathsSegmentOptions,\n PathUndeleteHeaders,\n DataLakeClientOptions,\n DataLakeClientConfig,\n} from \"./models.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { toContainerPublicAccessType, toPublicAccessType, toPermissions } from \"./transforms.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n assertResponse,\n EscapePath,\n windowsFileTimeTicksToTime,\n} from \"./utils/utils.common.js\";\nimport { DataLakeFileClient, DataLakeDirectoryClient } from \"./clients.js\";\nimport {\n generateDataLakeSASQueryParameters,\n generateDataLakeSASQueryParametersInternal,\n} from \"./sas/DataLakeSASSignatureValues.js\";\nimport { DeletionIdKey, PathResultTypeConstants } from \"./utils/constants.js\";\nimport { PathClientInternal } from \"./utils/PathClientInternal.js\";\nimport type { UserDelegationKey } from \"@azure/storage-common\";\n\n/**\n * A DataLakeFileSystemClient represents a URL to the Azure Storage file system\n * allowing you to manipulate its directories and files.\n */\nexport class DataLakeFileSystemClient extends StorageClient {\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContext: FileSystem;\n\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContextToBlobEndpoint: FileSystem;\n\n /**\n * blobContainerClient provided by `@azure/storage-blob` package.\n */\n private blobContainerClient: ContainerClient;\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and credential.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: DataLakeClientOptions,\n );\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and pipeline.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: Pipeline, options?: DataLakeClientConfig);\n\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: DataLakeClientOptions,\n ) {\n if (isPipelineLike(credentialOrPipeline)) {\n super(url, credentialOrPipeline, options);\n } else {\n let credential;\n if (credentialOrPipeline === undefined) {\n credential = new AnonymousCredential();\n } else {\n credential = credentialOrPipeline;\n }\n\n const pipeline = newPipeline(credential, options);\n super(url, pipeline, options);\n }\n\n this.fileSystemContext = new FileSystem(this.storageClientContext);\n this.fileSystemContextToBlobEndpoint = new FileSystem(this.storageClientContextToBlobEndpoint);\n this.blobContainerClient = new ContainerClient(this.blobEndpointUrl, this.pipeline);\n }\n\n /**\n * Name of current file system.\n *\n * @readonly\n */\n public get name(): string {\n return this.blobContainerClient.containerName;\n }\n\n /**\n * Creates a {@link DataLakeDirectoryClient} object under current file system.\n *\n * @param directoryName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getDirectoryClient(directoryName: string): DataLakeDirectoryClient {\n return new DataLakeDirectoryClient(\n appendToURLPath(this.url, EscapePath(directoryName)),\n this.pipeline,\n this.dataLakeClientConfig,\n );\n }\n\n /**\n * Creates a {@link DataLakeFileClient} object under current file system.\n *\n * @param fileName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getFileClient(fileName: string): DataLakeFileClient {\n return new DataLakeFileClient(\n appendToURLPath(this.url, EscapePath(fileName)),\n this.pipeline,\n this.dataLakeClientConfig,\n );\n }\n\n /**\n * Get a {@link DataLakeLeaseClient} that manages leases on the file system.\n *\n * @param proposeLeaseId - Optional. Initial proposed lease Id.\n */\n public getDataLakeLeaseClient(proposeLeaseId?: string): DataLakeLeaseClient {\n return new DataLakeLeaseClient(this.blobContainerClient.getBlobLeaseClient(proposeLeaseId));\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, the operation fails.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param options - Optional. Options when creating file system.\n */\n public async create(options: FileSystemCreateOptions = {}): Promise<FileSystemCreateResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-create\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.create({\n ...options,\n access: toContainerPublicAccessType(options.access),\n tracingOptions: updatedOptions.tracingOptions,\n containerEncryptionScope: options.fileSystemEncryptionScope,\n });\n },\n );\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, it is not changed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param options -\n */\n public async createIfNotExists(\n options: FileSystemCreateOptions = {},\n ): Promise<FileSystemCreateIfNotExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-createIfNotExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.createIfNotExists({\n ...options,\n access: toContainerPublicAccessType(options.access),\n containerEncryptionScope: options.fileSystemEncryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Returns true if the File system represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing file system might be deleted by other clients or\n * applications. Vice versa new file system with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param options -\n */\n public async exists(options: FileSystemExistsOptions = {}): Promise<boolean> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-exists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.exists(updatedOptions);\n },\n );\n }\n\n /**\n * Delete current file system.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-container\n *\n * @param options - Optional. Options when deleting file system.\n */\n public async delete(options: FileSystemDeleteOptions = {}): Promise<FileSystemDeleteResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-delete\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.delete({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Delete current file system if it exists.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-container\n *\n * @param options -\n */\n public async deleteIfExists(\n options: FileSystemDeleteOptions = {},\n ): Promise<FileSystemDeleteIfExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-deleteIfExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.deleteIfExists(updatedOptions);\n },\n );\n }\n\n /**\n * Returns all user-defined metadata and system properties for the specified\n * file system.\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listFileSystems` method of {@link DataLakeServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties\n *\n * @param options - Optional. Options when getting file system properties.\n */\n public async getProperties(\n options: FileSystemGetPropertiesOptions = {},\n ): Promise<FileSystemGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getProperties\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getProperties({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as FileSystemGetPropertiesResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets one or more user-defined name-value pairs for the specified file system.\n *\n * If no option provided, or no metadata defined in the parameter, the file system\n * metadata will be removed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Optional. Options when setting file system metadata.\n */\n public async setMetadata(\n metadata?: Metadata,\n options: FileSystemSetMetadataOptions = {},\n ): Promise<FileSystemSetMetadataResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setMetadata\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setMetadata(metadata, {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Gets the permissions for the specified file system. The permissions indicate\n * whether file system data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl\n *\n * @param options - Optional. Options when getting file system access policy.\n */\n public async getAccessPolicy(\n options: FileSystemGetAccessPolicyOptions = {},\n ): Promise<FileSystemGetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getAccessPolicy\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getAccessPolicy({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as unknown as FileSystemGetAccessPolicyResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets the permissions for the specified file system. The permissions indicate\n * whether directories or files in a file system may be accessed publicly.\n *\n * When you set permissions for a file system, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing file system ACL will be\n * removed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl\n *\n * @param access - Optional. The level of public access to data in the file system.\n * @param fileSystemAcl - Optional. Array of elements each having a unique Id and details of the access policy.\n * @param options - Optional. Options when setting file system access policy.\n */\n public async setAccessPolicy(\n access?: PublicAccessType,\n fileSystemAcl?: SignedIdentifier<AccessPolicy>[],\n options: FileSystemSetAccessPolicyOptions = {},\n ): Promise<FileSystemSetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setAccessPolicy\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setAccessPolicy(\n toContainerPublicAccessType(access),\n fileSystemAcl,\n {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n },\n );\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListPaths\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const paths = fileSystemClient.listPaths();\n * for await (const path of paths) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListPaths_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const paths = fileSystemClient.listPaths();\n * let { value, done } = await paths.next();\n * while (!done) {\n * console.log(`Path ${i++}: ${value.name}, is directory: ${value.isDirectory}`);\n * ({ value, done } = await paths.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListPaths_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * for await (const response of fileSystemClient.listPaths().byPage({ maxPageSize: 20 })) {\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListPaths_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * let paths = fileSystemClient.listPaths().byPage({ maxPageSize: 2 });\n * let response = (await paths.next()).value;\n * // Prints 2 paths\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * paths = fileSystemClient.listPaths().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await paths.next()).value;\n * // Prints 10 paths\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing paths.\n */\n public listPaths(\n options: ListPathsOptions = {},\n ): PagedAsyncIterableIterator<Path, FileSystemListPathsResponse> {\n options.path = options.path === \"\" ? undefined : options.path;\n\n const iter = this.listItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n\n private async *listItems(options: ListPathsSegmentOptions = {}): AsyncIterableIterator<Path> {\n for await (const response of this.listSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listSegments(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listPathsSegment(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): Promise<FileSystemListPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, {\n continuation,\n ...updatedOptions,\n upn: options.userPrincipalName,\n beginFrom: options.startFrom,\n });\n\n const response = rawResponse as FileSystemListPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.paths || []) {\n response.pathItems.push({\n ...path,\n permissions: toPermissions(path.permissions),\n createdOn: windowsFileTimeTicksToTime(path.creationTime),\n expiresOn: windowsFileTimeTicksToTime(path.expiryTime),\n });\n }\n delete rawResponse.paths;\n\n return response;\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const deletedPaths = fileSystemClient.listDeletedPaths();\n * for await (const deletedPath of deletedPaths) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const deletedPaths = fileSystemClient.listDeletedPaths();\n * let { value, done } = await deletedPaths.next();\n * while (!done) {\n * console.log(`Deleted path ${i++}: ${value.name}, deleted on: ${value.deletedOn}`);\n * ({ value, done } = await deletedPaths.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * for await (const response of fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 20 })) {\n * if (response.pathItems) {\n * for (const deletedPath of response.pathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * let deletedPaths = fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 2 });\n * let response = (await deletedPaths.next()).value;\n * // Prints 2 deleted paths\n * if (response.deletedPathItems) {\n * for (const deletedPath of response.deletedPathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * deletedPaths = fileSystemClient\n * .listDeletedPaths()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await deletedPaths.next()).value;\n * // Prints 10 deleted paths\n * if (response.deletedPathItems) {\n * for (const deletedPath of response.deletedPathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing deleted paths.\n */\n public listDeletedPaths(\n options: ListDeletedPathsOptions = {},\n ): PagedAsyncIterableIterator<DeletedPath, FileSystemListDeletedPathsResponse> {\n const iter = this.listDeletedItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listDeletedSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n private async *listDeletedItems(\n options: ListDeletedPathsOptions = {},\n ): AsyncIterableIterator<DeletedPath> {\n for await (const response of this.listDeletedSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listDeletedSegments(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListDeletedPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listDeletedPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listDeletedPathsSegment(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): Promise<FileSystemListDeletedPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listDeletedPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment({\n marker: continuation,\n ...updatedOptions,\n prefix: options.prefix === \"\" ? undefined : options.prefix,\n });\n\n const response = rawResponse as FileSystemListDeletedPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.segment.blobItems || []) {\n response.pathItems.push({\n name: path.name,\n deletionId: path.deletionId,\n deletedOn: path.properties.deletedTime,\n remainingRetentionDays: path.properties.remainingRetentionDays,\n });\n }\n\n if (response.nextMarker) {\n response.continuation = response.nextMarker;\n }\n\n return response;\n },\n );\n }\n\n /**\n * Restores a soft deleted path.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob\n *\n * @param deletedPath - Required. The path of the deleted path.\n *\n * @param deletionId - Required. The deletion ID associated with the soft deleted path.\n *\n */\n\n public async undeletePath(\n deletedPath: string,\n deletionId: string,\n options: FileSystemUndeletePathOption = {},\n ): Promise<FileSystemUndeletePathResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-undeletePath\",\n options,\n async (updatedOptions) => {\n const pathClient = new PathClientInternal(\n appendToURLPath(this.blobEndpointUrl, EscapePath(deletedPath)),\n this.pipeline,\n );\n\n const rawResponse = assertResponse<PathUndeleteHeaders, PathUndeleteHeaders>(\n await pathClient.blobPathContext.undelete({\n undeleteSource: \"?\" + DeletionIdKey + \"=\" + deletionId,\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n\n if (rawResponse.resourceType === PathResultTypeConstants.DirectoryResourceType) {\n return {\n pathClient: this.getDirectoryClient(deletedPath),\n ...rawResponse,\n };\n } else {\n return {\n pathClient: this.getFileClient(deletedPath),\n ...rawResponse,\n };\n }\n },\n );\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasUrl(options: FileSystemGenerateSasUrlOptions): Promise<string> {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n public generateSasStringToSign(options: FileSystemGenerateSasUrlOptions): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateUserDelegationSasUrl(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): Promise<string> {\n return new Promise((resolve) => {\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n\n public generateUserDelegationSasStringToSign(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): string {\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).stringToSign;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DataLakeFileSystemClient.js","sourceRoot":"","sources":["../../src/DataLakeFileSystemClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAoC7F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE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AAM,GAAG,GAAG,kCAAkC,CAC5C;gBACE,cAAc,EAAE,IAAI,CAAC,IAAI;gBACzB,GAAG,OAAO;aACX,EACD,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,QAAQ,EAAE,CAAC;YAEb,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IAEI,qCAAqC,CAC1C,OAAwC,EACxC,iBAAoC;QAEpC,OAAO,0CAA0C,CAC/C;YACE,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,GAAG,OAAO;SACX,EACD,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ContainerClient } from \"@azure/storage-blob\";\nimport type { Pipeline } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"@azure/storage-common\";\nimport { DataLakeLeaseClient } from \"./DataLakeLeaseClient.js\";\nimport { FileSystemOperationsImpl as FileSystem } from \"./generated/src/operations/index.js\";\nimport type {\n AccessPolicy,\n FileSystemCreateOptions,\n FileSystemCreateResponse,\n FileSystemDeleteOptions,\n FileSystemDeleteResponse,\n FileSystemExistsOptions,\n FileSystemGetAccessPolicyOptions,\n FileSystemGetAccessPolicyResponse,\n FileSystemGetPropertiesOptions,\n FileSystemGetPropertiesResponse,\n FileSystemSetAccessPolicyOptions,\n FileSystemSetAccessPolicyResponse,\n FileSystemSetMetadataOptions,\n FileSystemSetMetadataResponse,\n ListPathsOptions,\n ListPathsSegmentOptions,\n Metadata,\n Path,\n PublicAccessType,\n SignedIdentifier,\n FileSystemListPathsResponse,\n FileSystemCreateIfNotExistsResponse,\n FileSystemDeleteIfExistsResponse,\n FileSystemGenerateSasUrlOptions,\n FileSystemListDeletedPathsResponse,\n ListDeletedPathsOptions,\n DeletedPath,\n FileSystemUndeletePathResponse,\n FileSystemUndeletePathOption,\n ListDeletedPathsSegmentOptions,\n PathUndeleteHeaders,\n DataLakeClientConfig,\n DataLakeFileSystemClientOptions,\n} from \"./models.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { toContainerPublicAccessType, toPublicAccessType, toPermissions } from \"./transforms.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n assertResponse,\n EscapePath,\n windowsFileTimeTicksToTime,\n} from \"./utils/utils.common.js\";\nimport { DataLakeFileClient, DataLakeDirectoryClient } from \"./clients.js\";\nimport {\n generateDataLakeSASQueryParameters,\n generateDataLakeSASQueryParametersInternal,\n} from \"./sas/DataLakeSASSignatureValues.js\";\nimport { DeletionIdKey, PathResultTypeConstants } from \"./utils/constants.js\";\nimport { PathClientInternal } from \"./utils/PathClientInternal.js\";\nimport type { UserDelegationKey } from \"@azure/storage-common\";\n\n/**\n * A DataLakeFileSystemClient represents a URL to the Azure Storage file system\n * allowing you to manipulate its directories and files.\n */\nexport class DataLakeFileSystemClient extends StorageClient {\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContext: FileSystem;\n\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContextToBlobEndpoint: FileSystem;\n\n /**\n * blobContainerClient provided by `@azure/storage-blob` package.\n */\n private blobContainerClient: ContainerClient;\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and credential.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: DataLakeFileSystemClientOptions,\n );\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and pipeline.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: Pipeline, options?: DataLakeClientConfig);\n\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: DataLakeFileSystemClientOptions,\n ) {\n if (isPipelineLike(credentialOrPipeline)) {\n super(url, credentialOrPipeline, options);\n } else {\n let credential;\n if (credentialOrPipeline === undefined) {\n credential = new AnonymousCredential();\n } else {\n credential = credentialOrPipeline;\n }\n\n const pipeline = newPipeline(credential, options);\n super(url, pipeline, options);\n }\n\n this.fileSystemContext = new FileSystem(this.storageClientContext);\n this.fileSystemContextToBlobEndpoint = new FileSystem(this.storageClientContextToBlobEndpoint);\n this.blobContainerClient = new ContainerClient(this.blobEndpointUrl, this.pipeline);\n }\n\n /**\n * Name of current file system.\n *\n * @readonly\n */\n public get name(): string {\n return this.blobContainerClient.containerName;\n }\n\n /**\n * Creates a {@link DataLakeDirectoryClient} object under current file system.\n *\n * @param directoryName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getDirectoryClient(directoryName: string): DataLakeDirectoryClient {\n return new DataLakeDirectoryClient(\n appendToURLPath(this.url, EscapePath(directoryName)),\n this.pipeline,\n this.dataLakeClientConfig,\n );\n }\n\n /**\n * Creates a {@link DataLakeFileClient} object under current file system.\n *\n * @param fileName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getFileClient(fileName: string): DataLakeFileClient {\n return new DataLakeFileClient(\n appendToURLPath(this.url, EscapePath(fileName)),\n this.pipeline,\n this.dataLakeClientConfig,\n );\n }\n\n /**\n * Get a {@link DataLakeLeaseClient} that manages leases on the file system.\n *\n * @param proposeLeaseId - Optional. Initial proposed lease Id.\n */\n public getDataLakeLeaseClient(proposeLeaseId?: string): DataLakeLeaseClient {\n return new DataLakeLeaseClient(this.blobContainerClient.getBlobLeaseClient(proposeLeaseId));\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, the operation fails.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param options - Optional. Options when creating file system.\n */\n public async create(options: FileSystemCreateOptions = {}): Promise<FileSystemCreateResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-create\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.create({\n ...options,\n access: toContainerPublicAccessType(options.access),\n tracingOptions: updatedOptions.tracingOptions,\n containerEncryptionScope: options.fileSystemEncryptionScope,\n });\n },\n );\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, it is not changed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param options -\n */\n public async createIfNotExists(\n options: FileSystemCreateOptions = {},\n ): Promise<FileSystemCreateIfNotExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-createIfNotExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.createIfNotExists({\n ...options,\n access: toContainerPublicAccessType(options.access),\n containerEncryptionScope: options.fileSystemEncryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Returns true if the File system represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing file system might be deleted by other clients or\n * applications. Vice versa new file system with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param options -\n */\n public async exists(options: FileSystemExistsOptions = {}): Promise<boolean> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-exists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.exists(updatedOptions);\n },\n );\n }\n\n /**\n * Delete current file system.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-container\n *\n * @param options - Optional. Options when deleting file system.\n */\n public async delete(options: FileSystemDeleteOptions = {}): Promise<FileSystemDeleteResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-delete\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.delete({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Delete current file system if it exists.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-container\n *\n * @param options -\n */\n public async deleteIfExists(\n options: FileSystemDeleteOptions = {},\n ): Promise<FileSystemDeleteIfExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-deleteIfExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.deleteIfExists(updatedOptions);\n },\n );\n }\n\n /**\n * Returns all user-defined metadata and system properties for the specified\n * file system.\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listFileSystems` method of {@link DataLakeServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties\n *\n * @param options - Optional. Options when getting file system properties.\n */\n public async getProperties(\n options: FileSystemGetPropertiesOptions = {},\n ): Promise<FileSystemGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getProperties\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getProperties({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as FileSystemGetPropertiesResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets one or more user-defined name-value pairs for the specified file system.\n *\n * If no option provided, or no metadata defined in the parameter, the file system\n * metadata will be removed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Optional. Options when setting file system metadata.\n */\n public async setMetadata(\n metadata?: Metadata,\n options: FileSystemSetMetadataOptions = {},\n ): Promise<FileSystemSetMetadataResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setMetadata\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setMetadata(metadata, {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Gets the permissions for the specified file system. The permissions indicate\n * whether file system data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl\n *\n * @param options - Optional. Options when getting file system access policy.\n */\n public async getAccessPolicy(\n options: FileSystemGetAccessPolicyOptions = {},\n ): Promise<FileSystemGetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getAccessPolicy\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getAccessPolicy({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as unknown as FileSystemGetAccessPolicyResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets the permissions for the specified file system. The permissions indicate\n * whether directories or files in a file system may be accessed publicly.\n *\n * When you set permissions for a file system, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing file system ACL will be\n * removed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl\n *\n * @param access - Optional. The level of public access to data in the file system.\n * @param fileSystemAcl - Optional. Array of elements each having a unique Id and details of the access policy.\n * @param options - Optional. Options when setting file system access policy.\n */\n public async setAccessPolicy(\n access?: PublicAccessType,\n fileSystemAcl?: SignedIdentifier<AccessPolicy>[],\n options: FileSystemSetAccessPolicyOptions = {},\n ): Promise<FileSystemSetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setAccessPolicy\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setAccessPolicy(\n toContainerPublicAccessType(access),\n fileSystemAcl,\n {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n },\n );\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListPaths\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const paths = fileSystemClient.listPaths();\n * for await (const path of paths) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListPaths_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const paths = fileSystemClient.listPaths();\n * let { value, done } = await paths.next();\n * while (!done) {\n * console.log(`Path ${i++}: ${value.name}, is directory: ${value.isDirectory}`);\n * ({ value, done } = await paths.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListPaths_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * for await (const response of fileSystemClient.listPaths().byPage({ maxPageSize: 20 })) {\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListPaths_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * let paths = fileSystemClient.listPaths().byPage({ maxPageSize: 2 });\n * let response = (await paths.next()).value;\n * // Prints 2 paths\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * paths = fileSystemClient.listPaths().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await paths.next()).value;\n * // Prints 10 paths\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing paths.\n */\n public listPaths(\n options: ListPathsOptions = {},\n ): PagedAsyncIterableIterator<Path, FileSystemListPathsResponse> {\n options.path = options.path === \"\" ? undefined : options.path;\n\n const iter = this.listItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n\n private async *listItems(options: ListPathsSegmentOptions = {}): AsyncIterableIterator<Path> {\n for await (const response of this.listSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listSegments(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listPathsSegment(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): Promise<FileSystemListPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, {\n continuation,\n ...updatedOptions,\n upn: options.userPrincipalName,\n beginFrom: options.startFrom,\n });\n\n const response = rawResponse as FileSystemListPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.paths || []) {\n response.pathItems.push({\n ...path,\n permissions: toPermissions(path.permissions),\n createdOn: windowsFileTimeTicksToTime(path.creationTime),\n expiresOn: windowsFileTimeTicksToTime(path.expiryTime),\n });\n }\n delete rawResponse.paths;\n\n return response;\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const deletedPaths = fileSystemClient.listDeletedPaths();\n * for await (const deletedPath of deletedPaths) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const deletedPaths = fileSystemClient.listDeletedPaths();\n * let { value, done } = await deletedPaths.next();\n * while (!done) {\n * console.log(`Deleted path ${i++}: ${value.name}, deleted on: ${value.deletedOn}`);\n * ({ value, done } = await deletedPaths.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * for await (const response of fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 20 })) {\n * if (response.pathItems) {\n * for (const deletedPath of response.pathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * let deletedPaths = fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 2 });\n * let response = (await deletedPaths.next()).value;\n * // Prints 2 deleted paths\n * if (response.deletedPathItems) {\n * for (const deletedPath of response.deletedPathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * deletedPaths = fileSystemClient\n * .listDeletedPaths()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await deletedPaths.next()).value;\n * // Prints 10 deleted paths\n * if (response.deletedPathItems) {\n * for (const deletedPath of response.deletedPathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing deleted paths.\n */\n public listDeletedPaths(\n options: ListDeletedPathsOptions = {},\n ): PagedAsyncIterableIterator<DeletedPath, FileSystemListDeletedPathsResponse> {\n const iter = this.listDeletedItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listDeletedSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n private async *listDeletedItems(\n options: ListDeletedPathsOptions = {},\n ): AsyncIterableIterator<DeletedPath> {\n for await (const response of this.listDeletedSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listDeletedSegments(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListDeletedPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listDeletedPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listDeletedPathsSegment(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): Promise<FileSystemListDeletedPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listDeletedPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment({\n marker: continuation,\n ...updatedOptions,\n prefix: options.prefix === \"\" ? undefined : options.prefix,\n });\n\n const response = rawResponse as FileSystemListDeletedPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.segment.blobItems || []) {\n response.pathItems.push({\n name: path.name,\n deletionId: path.deletionId,\n deletedOn: path.properties.deletedTime,\n remainingRetentionDays: path.properties.remainingRetentionDays,\n });\n }\n\n if (response.nextMarker) {\n response.continuation = response.nextMarker;\n }\n\n return response;\n },\n );\n }\n\n /**\n * Restores a soft deleted path.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob\n *\n * @param deletedPath - Required. The path of the deleted path.\n *\n * @param deletionId - Required. The deletion ID associated with the soft deleted path.\n *\n */\n\n public async undeletePath(\n deletedPath: string,\n deletionId: string,\n options: FileSystemUndeletePathOption = {},\n ): Promise<FileSystemUndeletePathResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-undeletePath\",\n options,\n async (updatedOptions) => {\n const pathClient = new PathClientInternal(\n appendToURLPath(this.blobEndpointUrl, EscapePath(deletedPath)),\n this.pipeline,\n );\n\n const rawResponse = assertResponse<PathUndeleteHeaders, PathUndeleteHeaders>(\n await pathClient.blobPathContext.undelete({\n undeleteSource: \"?\" + DeletionIdKey + \"=\" + deletionId,\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n\n if (rawResponse.resourceType === PathResultTypeConstants.DirectoryResourceType) {\n return {\n pathClient: this.getDirectoryClient(deletedPath),\n ...rawResponse,\n };\n } else {\n return {\n pathClient: this.getFileClient(deletedPath),\n ...rawResponse,\n };\n }\n },\n );\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasUrl(options: FileSystemGenerateSasUrlOptions): Promise<string> {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n public generateSasStringToSign(options: FileSystemGenerateSasUrlOptions): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateUserDelegationSasUrl(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): Promise<string> {\n return new Promise((resolve) => {\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n\n public generateUserDelegationSasStringToSign(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): string {\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).stringToSign;\n }\n}\n"]}
|