@azure/storage-file-datalake 12.26.0 → 12.27.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -190
- package/dist/browser/DataLakeFileSystemClient.d.ts +473 -0
- package/dist/browser/DataLakeFileSystemClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/DataLakeFileSystemClient.js +170 -75
- package/dist/browser/DataLakeFileSystemClient.js.map +1 -0
- package/dist/browser/DataLakeLeaseClient.d.ts +14 -0
- package/dist/browser/DataLakeLeaseClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/DataLakeLeaseClient.js +3 -1
- package/dist/browser/DataLakeLeaseClient.js.map +1 -0
- package/dist/browser/DataLakeServiceClient.d.ts +281 -0
- package/dist/browser/DataLakeServiceClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/DataLakeServiceClient.js +94 -62
- package/dist/browser/DataLakeServiceClient.js.map +1 -0
- package/dist/browser/Pipeline.d.ts +52 -0
- package/dist/browser/Pipeline.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/Pipeline.js +8 -8
- package/dist/browser/Pipeline.js.map +1 -0
- package/dist/browser/StorageClient.d.ts +61 -0
- package/dist/browser/StorageClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/StorageClient.js +5 -3
- package/dist/browser/StorageClient.js.map +1 -0
- package/dist/browser/StorageContextClient.d.ts +9 -0
- package/dist/browser/StorageContextClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/StorageContextClient.js +3 -3
- package/dist/browser/StorageContextClient.js.map +1 -0
- package/dist/browser/clients.d.ts +689 -0
- package/dist/browser/clients.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/clients.js +87 -45
- package/dist/browser/clients.js.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential.d.ts +3 -0
- package/{dist-esm/storage-file-datalake/src/credentials/StorageSharedKeyCredential.browser.js → dist/browser/credentials/StorageSharedKeyCredential.js} +1 -1
- package/dist/browser/credentials/UserDelegationKeyCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/UserDelegationKeyCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/UserDelegationKeyCredential.d.ts +3 -0
- package/{dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.browser.js → dist/browser/credentials/UserDelegationKeyCredential.js} +1 -1
- package/dist/browser/generated/src/index.d.ts +4 -0
- package/dist/browser/generated/src/index.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/index.js +3 -3
- package/dist/browser/generated/src/index.js.map +1 -0
- package/dist/browser/generated/src/models/index.d.ts +1091 -0
- package/dist/browser/generated/src/models/index.d.ts.map +1 -0
- package/dist/browser/generated/src/models/index.js.map +1 -0
- package/dist/browser/generated/src/models/mappers.d.ts +53 -0
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/src/models/mappers.js.map +1 -0
- package/dist/browser/generated/src/models/parameters.d.ts +87 -0
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/models/parameters.js +1 -1
- package/dist/browser/generated/src/models/parameters.js.map +1 -0
- package/dist/browser/generated/src/operations/fileSystemOperations.d.ts +55 -0
- package/dist/browser/generated/src/operations/fileSystemOperations.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operations/fileSystemOperations.js +2 -2
- package/dist/browser/generated/src/operations/fileSystemOperations.js.map +1 -0
- package/dist/browser/generated/src/operations/index.d.ts +4 -0
- package/dist/browser/generated/src/operations/index.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces → dist/browser/generated/src/operations}/index.js +3 -3
- package/dist/browser/generated/src/operations/index.js.map +1 -0
- package/dist/browser/generated/src/operations/pathOperations.d.ts +120 -0
- package/dist/browser/generated/src/operations/pathOperations.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operations/pathOperations.js +2 -2
- package/dist/browser/generated/src/operations/pathOperations.js.map +1 -0
- package/dist/browser/generated/src/operations/service.d.ts +18 -0
- package/dist/browser/generated/src/operations/service.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operations/service.js +2 -2
- package/dist/browser/generated/src/operations/service.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/fileSystemOperations.d.ts +47 -0
- package/dist/browser/generated/src/operationsInterfaces/fileSystemOperations.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +4 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js +11 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/pathOperations.d.ts +112 -0
- package/dist/browser/generated/src/operationsInterfaces/pathOperations.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/pathOperations.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/service.d.ts +10 -0
- package/dist/browser/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/browser/generated/src/storageClient.d.ts +20 -0
- package/dist/browser/generated/src/storageClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/storageClient.js +3 -3
- package/dist/browser/generated/src/storageClient.js.map +1 -0
- package/dist/browser/index-browser.d.mts.map +1 -0
- package/dist/browser/index-browser.mjs.map +1 -0
- package/dist/browser/index.d.ts +13 -0
- package/{dist-esm/storage-file-datalake/src/index.browser.js → dist/browser/index.js} +10 -10
- package/dist/browser/log.d.ts +5 -0
- package/dist/browser/log.d.ts.map +1 -0
- package/dist/browser/log.js.map +1 -0
- package/dist/browser/models.d.ts +1318 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.internal.d.ts +2 -0
- package/dist/browser/models.internal.d.ts.map +1 -0
- package/dist/browser/models.internal.js.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/models.js +2 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/sas/AccountSASPermissions.d.ts +61 -0
- package/dist/browser/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASPermissions.js.map +1 -0
- package/dist/browser/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/browser/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/browser/sas/AccountSASServices.d.ts +40 -0
- package/dist/browser/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASServices.js.map +1 -0
- package/dist/browser/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/browser/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/AccountSASSignatureValues.js +7 -7
- package/dist/browser/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/browser/sas/DataLakeSASPermissions.d.ts +65 -0
- package/dist/browser/sas/DataLakeSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/DataLakeSASPermissions.js.map +1 -0
- package/dist/browser/sas/DataLakeSASSignatureValues.d.ts +205 -0
- package/dist/browser/sas/DataLakeSASSignatureValues.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/DataLakeSASSignatureValues.js +107 -10
- package/dist/browser/sas/DataLakeSASSignatureValues.js.map +1 -0
- package/dist/browser/sas/DirectorySASPermissions.d.ts +69 -0
- package/dist/browser/sas/DirectorySASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/DirectorySASPermissions.js.map +1 -0
- package/dist/browser/sas/FileSystemSASPermissions.d.ts +69 -0
- package/dist/browser/sas/FileSystemSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/FileSystemSASPermissions.js.map +1 -0
- package/dist/browser/sas/SASQueryParameters.d.ts +309 -0
- package/dist/browser/sas/SASQueryParameters.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/SASQueryParameters.js +4 -2
- package/dist/browser/sas/SASQueryParameters.js.map +1 -0
- package/dist/browser/sas/SasIPRange.d.ts +24 -0
- package/dist/browser/sas/SasIPRange.d.ts.map +1 -0
- package/dist/browser/sas/SasIPRange.js.map +1 -0
- package/dist/browser/transforms.d.ts +51 -0
- package/dist/browser/transforms.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/transforms.js +2 -2
- package/dist/browser/transforms.js.map +1 -0
- package/dist/browser/utils/Batch.d.ts +68 -0
- package/dist/browser/utils/Batch.d.ts.map +1 -0
- package/dist/browser/utils/Batch.js.map +1 -0
- package/dist/browser/utils/BufferScheduler.d.ts +158 -0
- package/dist/browser/utils/BufferScheduler.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/BufferScheduler.js +1 -1
- package/dist/browser/utils/BufferScheduler.js.map +1 -0
- package/dist/browser/utils/DataLakeAclChangeFailedError.d.ts +16 -0
- package/dist/browser/utils/DataLakeAclChangeFailedError.d.ts.map +1 -0
- package/dist/browser/utils/DataLakeAclChangeFailedError.js.map +1 -0
- package/dist/browser/utils/PathClientInternal.d.ts +24 -0
- package/dist/browser/utils/PathClientInternal.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/PathClientInternal.js +2 -2
- package/dist/browser/utils/PathClientInternal.js.map +1 -0
- package/dist/browser/utils/constants.d.ts +70 -0
- package/dist/browser/utils/constants.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/constants.js +2 -2
- package/dist/browser/utils/constants.js.map +1 -0
- package/dist/browser/utils/tracing.d.ts +6 -0
- package/dist/browser/utils/tracing.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/tracing.js +1 -1
- package/dist/browser/utils/tracing.js.map +1 -0
- package/dist/browser/utils/utils-browser.d.mts.map +1 -0
- package/dist/browser/utils/utils-browser.mjs.map +1 -0
- package/dist/browser/utils/utils.common.d.ts +236 -0
- package/dist/browser/utils/utils.common.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/utils.common.js +5 -5
- package/dist/browser/utils/utils.common.js.map +1 -0
- package/dist/browser/utils/utils.d.ts +3 -0
- package/dist/browser/utils/utils.js +9 -0
- package/dist/commonjs/DataLakeFileSystemClient.d.ts +473 -0
- package/dist/commonjs/DataLakeFileSystemClient.d.ts.map +1 -0
- package/dist/commonjs/DataLakeFileSystemClient.js +683 -0
- package/dist/commonjs/DataLakeFileSystemClient.js.map +1 -0
- package/dist/commonjs/DataLakeLeaseClient.d.ts +14 -0
- package/dist/commonjs/DataLakeLeaseClient.d.ts.map +1 -0
- package/dist/commonjs/DataLakeLeaseClient.js +49 -0
- package/dist/commonjs/DataLakeLeaseClient.js.map +1 -0
- package/dist/commonjs/DataLakeServiceClient.d.ts +281 -0
- package/dist/commonjs/DataLakeServiceClient.d.ts.map +1 -0
- package/dist/commonjs/DataLakeServiceClient.js +372 -0
- package/dist/commonjs/DataLakeServiceClient.js.map +1 -0
- package/dist/commonjs/Pipeline.d.ts +52 -0
- package/dist/commonjs/Pipeline.d.ts.map +1 -0
- package/dist/commonjs/Pipeline.js +222 -0
- package/dist/commonjs/Pipeline.js.map +1 -0
- package/dist/commonjs/StorageClient.d.ts +61 -0
- package/dist/commonjs/StorageClient.d.ts.map +1 -0
- package/dist/commonjs/StorageClient.js +55 -0
- package/dist/commonjs/StorageClient.js.map +1 -0
- package/dist/commonjs/StorageContextClient.d.ts +9 -0
- package/dist/commonjs/StorageContextClient.d.ts.map +1 -0
- package/dist/commonjs/StorageContextClient.js +39 -0
- package/dist/commonjs/StorageContextClient.js.map +1 -0
- package/dist/commonjs/clients.d.ts +689 -0
- package/dist/commonjs/clients.d.ts.map +1 -0
- package/dist/commonjs/clients.js +1195 -0
- package/dist/commonjs/clients.js.map +1 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts +2 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js +8 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js +35 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/commonjs/generated/src/index.d.ts +4 -0
- package/dist/commonjs/generated/src/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/index.js +16 -0
- package/dist/commonjs/generated/src/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/index.d.ts +1091 -0
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/index.js +19 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts +53 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.js +2450 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts +87 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.js +952 -0
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.d.ts +55 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js +236 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operations/index.d.ts +4 -0
- package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/index.js +14 -0
- package/dist/commonjs/generated/src/operations/index.js.map +1 -0
- package/dist/commonjs/generated/src/operations/pathOperations.d.ts +120 -0
- package/dist/commonjs/generated/src/operations/pathOperations.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/pathOperations.js +596 -0
- package/dist/commonjs/generated/src/operations/pathOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operations/service.d.ts +18 -0
- package/dist/commonjs/generated/src/operations/service.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/service.js +63 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.d.ts +47 -0
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src/generated/src/operations/index.js → dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.js} +3 -4
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +4 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +14 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.d.ts +112 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/commonjs/generated/src/storageClient.d.ts +20 -0
- package/dist/commonjs/generated/src/storageClient.d.ts.map +1 -0
- package/dist/commonjs/generated/src/storageClient.js +52 -0
- package/dist/commonjs/generated/src/storageClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +23 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +49 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/log.d.ts +5 -0
- package/dist/commonjs/log.d.ts.map +1 -0
- package/dist/commonjs/log.js +11 -0
- package/dist/commonjs/log.js.map +1 -0
- package/dist/commonjs/models.d.ts +1318 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.internal.d.ts +2 -0
- package/dist/commonjs/models.internal.d.ts.map +1 -0
- package/dist/commonjs/models.internal.js +5 -0
- package/dist/commonjs/models.internal.js.map +1 -0
- package/dist/commonjs/models.js +57 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/sas/AccountSASPermissions.d.ts +61 -0
- package/dist/commonjs/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASPermissions.js +132 -0
- package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.js +76 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/commonjs/sas/AccountSASServices.d.ts +40 -0
- package/dist/commonjs/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASServices.js +84 -0
- package/dist/commonjs/sas/AccountSASServices.js.map +1 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.js +76 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.d.ts +65 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.js +139 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.d.ts +205 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.d.ts.map +1 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js +722 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js.map +1 -0
- package/dist/commonjs/sas/DirectorySASPermissions.d.ts +69 -0
- package/dist/commonjs/sas/DirectorySASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/DirectorySASPermissions.js +149 -0
- package/dist/commonjs/sas/DirectorySASPermissions.js.map +1 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.d.ts +69 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.js +149 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/SASQueryParameters.d.ts +309 -0
- package/dist/commonjs/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/commonjs/sas/SASQueryParameters.js +252 -0
- package/dist/commonjs/sas/SASQueryParameters.js.map +1 -0
- package/dist/commonjs/sas/SasIPRange.d.ts +24 -0
- package/dist/commonjs/sas/SasIPRange.d.ts.map +1 -0
- package/dist/commonjs/sas/SasIPRange.js +16 -0
- package/dist/commonjs/sas/SasIPRange.js.map +1 -0
- package/dist/commonjs/transforms.d.ts +51 -0
- package/dist/commonjs/transforms.d.ts.map +1 -0
- package/dist/commonjs/transforms.js +357 -0
- package/dist/commonjs/transforms.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/utils/Batch.d.ts +68 -0
- package/dist/commonjs/utils/Batch.d.ts.map +1 -0
- package/dist/commonjs/utils/Batch.js +126 -0
- package/dist/commonjs/utils/Batch.js.map +1 -0
- package/dist/commonjs/utils/BufferScheduler.d.ts +158 -0
- package/dist/commonjs/utils/BufferScheduler.d.ts.map +1 -0
- package/dist/commonjs/utils/BufferScheduler.js +268 -0
- package/dist/commonjs/utils/BufferScheduler.js.map +1 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.d.ts +16 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.d.ts.map +1 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js +17 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js.map +1 -0
- package/dist/commonjs/utils/PathClientInternal.d.ts +24 -0
- package/dist/commonjs/utils/PathClientInternal.d.ts.map +1 -0
- package/dist/commonjs/utils/PathClientInternal.js +28 -0
- package/dist/commonjs/utils/PathClientInternal.js.map +1 -0
- package/dist/commonjs/utils/constants.d.ts +70 -0
- package/dist/commonjs/utils/constants.d.ts.map +1 -0
- package/dist/commonjs/utils/constants.js +247 -0
- package/dist/commonjs/utils/constants.js.map +1 -0
- package/dist/commonjs/utils/tracing.d.ts +6 -0
- package/dist/commonjs/utils/tracing.d.ts.map +1 -0
- package/dist/commonjs/utils/tracing.js +17 -0
- package/dist/commonjs/utils/tracing.js.map +1 -0
- package/dist/commonjs/utils/utils.common.d.ts +236 -0
- package/dist/commonjs/utils/utils.common.d.ts.map +1 -0
- package/dist/commonjs/utils/utils.common.js +595 -0
- package/dist/commonjs/utils/utils.common.js.map +1 -0
- package/dist/commonjs/utils/utils.d.ts +29 -0
- package/dist/commonjs/utils/utils.d.ts.map +1 -0
- package/dist/commonjs/utils/utils.js +91 -0
- package/dist/commonjs/utils/utils.js.map +1 -0
- package/dist/esm/DataLakeFileSystemClient.d.ts +473 -0
- package/dist/esm/DataLakeFileSystemClient.d.ts.map +1 -0
- package/dist/esm/DataLakeFileSystemClient.js +679 -0
- package/dist/esm/DataLakeFileSystemClient.js.map +1 -0
- package/dist/esm/DataLakeLeaseClient.d.ts +14 -0
- package/dist/esm/DataLakeLeaseClient.d.ts.map +1 -0
- package/dist/esm/DataLakeLeaseClient.js +45 -0
- package/dist/esm/DataLakeLeaseClient.js.map +1 -0
- package/dist/esm/DataLakeServiceClient.d.ts +281 -0
- package/dist/esm/DataLakeServiceClient.d.ts.map +1 -0
- package/dist/esm/DataLakeServiceClient.js +368 -0
- package/dist/esm/DataLakeServiceClient.js.map +1 -0
- package/dist/esm/Pipeline.d.ts +52 -0
- package/dist/esm/Pipeline.d.ts.map +1 -0
- package/dist/esm/Pipeline.js +216 -0
- package/dist/esm/Pipeline.js.map +1 -0
- package/dist/esm/StorageClient.d.ts +61 -0
- package/dist/esm/StorageClient.d.ts.map +1 -0
- package/dist/esm/StorageClient.js +51 -0
- package/dist/esm/StorageClient.js.map +1 -0
- package/dist/esm/StorageContextClient.d.ts +9 -0
- package/dist/esm/StorageContextClient.d.ts.map +1 -0
- package/dist/esm/StorageContextClient.js +35 -0
- package/dist/esm/StorageContextClient.js.map +1 -0
- package/dist/esm/clients.d.ts +689 -0
- package/dist/esm/clients.d.ts.map +1 -0
- package/dist/esm/clients.js +1189 -0
- package/dist/esm/clients.js.map +1 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts +2 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/esm}/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/esm/generated/src/index.d.ts +4 -0
- package/dist/esm/generated/src/index.d.ts.map +1 -0
- package/dist/esm/generated/src/index.js +11 -0
- package/dist/esm/generated/src/index.js.map +1 -0
- package/dist/esm/generated/src/models/index.d.ts +1091 -0
- package/dist/esm/generated/src/models/index.d.ts.map +1 -0
- package/dist/esm/generated/src/models/index.js +16 -0
- package/dist/esm/generated/src/models/index.js.map +1 -0
- package/dist/esm/generated/src/models/mappers.d.ts +53 -0
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/src/models/mappers.js +2446 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -0
- package/dist/esm/generated/src/models/parameters.d.ts +87 -0
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/src/models/parameters.js +948 -0
- package/dist/esm/generated/src/models/parameters.js.map +1 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.d.ts +55 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.js +231 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.js.map +1 -0
- package/dist/esm/generated/src/operations/index.d.ts +4 -0
- package/dist/esm/generated/src/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/index.js +11 -0
- package/dist/esm/generated/src/operations/index.js.map +1 -0
- package/dist/esm/generated/src/operations/pathOperations.d.ts +120 -0
- package/dist/esm/generated/src/operations/pathOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/pathOperations.js +591 -0
- package/dist/esm/generated/src/operations/pathOperations.js.map +1 -0
- package/dist/esm/generated/src/operations/service.d.ts +18 -0
- package/dist/esm/generated/src/operations/service.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/service.js +58 -0
- package/dist/esm/generated/src/operations/service.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/fileSystemOperations.d.ts +47 -0
- package/dist/esm/generated/src/operationsInterfaces/fileSystemOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/fileSystemOperations.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts +4 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js +11 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/pathOperations.d.ts +112 -0
- package/dist/esm/generated/src/operationsInterfaces/pathOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/pathOperations.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/pathOperations.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/service.d.ts +10 -0
- package/dist/esm/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/service.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/esm/generated/src/storageClient.d.ts +20 -0
- package/dist/esm/generated/src/storageClient.d.ts.map +1 -0
- package/dist/esm/generated/src/storageClient.js +47 -0
- package/dist/esm/generated/src/storageClient.js.map +1 -0
- package/dist/esm/index.d.ts +23 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +23 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/log.d.ts +5 -0
- package/dist/esm/log.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src → dist/esm}/log.js +1 -1
- package/dist/esm/log.js.map +1 -0
- package/dist/esm/models.d.ts +1318 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.internal.d.ts +2 -0
- package/dist/esm/models.internal.d.ts.map +1 -0
- package/dist/esm/models.internal.js +4 -0
- package/dist/esm/models.internal.js.map +1 -0
- package/dist/esm/models.js +53 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/sas/AccountSASPermissions.d.ts +61 -0
- package/dist/esm/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASPermissions.js +128 -0
- package/dist/esm/sas/AccountSASPermissions.js.map +1 -0
- package/dist/esm/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/esm/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASResourceTypes.js +72 -0
- package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/esm/sas/AccountSASServices.d.ts +40 -0
- package/dist/esm/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASServices.js +80 -0
- package/dist/esm/sas/AccountSASServices.js.map +1 -0
- package/dist/esm/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/esm/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASSignatureValues.js +72 -0
- package/dist/esm/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/esm/sas/DataLakeSASPermissions.d.ts +65 -0
- package/dist/esm/sas/DataLakeSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/DataLakeSASPermissions.js +135 -0
- package/dist/esm/sas/DataLakeSASPermissions.js.map +1 -0
- package/dist/esm/sas/DataLakeSASSignatureValues.d.ts +205 -0
- package/dist/esm/sas/DataLakeSASSignatureValues.d.ts.map +1 -0
- package/dist/esm/sas/DataLakeSASSignatureValues.js +718 -0
- package/dist/esm/sas/DataLakeSASSignatureValues.js.map +1 -0
- package/dist/esm/sas/DirectorySASPermissions.d.ts +69 -0
- package/dist/esm/sas/DirectorySASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/DirectorySASPermissions.js +145 -0
- package/dist/esm/sas/DirectorySASPermissions.js.map +1 -0
- package/dist/esm/sas/FileSystemSASPermissions.d.ts +69 -0
- package/dist/esm/sas/FileSystemSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/FileSystemSASPermissions.js +145 -0
- package/dist/esm/sas/FileSystemSASPermissions.js.map +1 -0
- package/dist/esm/sas/SASQueryParameters.d.ts +309 -0
- package/dist/esm/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/esm/sas/SASQueryParameters.js +248 -0
- package/dist/esm/sas/SASQueryParameters.js.map +1 -0
- package/dist/esm/sas/SasIPRange.d.ts +24 -0
- package/dist/esm/sas/SasIPRange.d.ts.map +1 -0
- package/dist/esm/sas/SasIPRange.js +13 -0
- package/dist/esm/sas/SasIPRange.js.map +1 -0
- package/dist/esm/transforms.d.ts +51 -0
- package/dist/esm/transforms.d.ts.map +1 -0
- package/dist/esm/transforms.js +337 -0
- package/dist/esm/transforms.js.map +1 -0
- package/dist/esm/utils/Batch.d.ts +68 -0
- package/dist/esm/utils/Batch.d.ts.map +1 -0
- package/dist/esm/utils/Batch.js.map +1 -0
- package/dist/esm/utils/BufferScheduler.d.ts +158 -0
- package/dist/esm/utils/BufferScheduler.d.ts.map +1 -0
- package/{dist-esm/storage-common/src → dist/esm/utils}/BufferScheduler.js +27 -15
- package/dist/esm/utils/BufferScheduler.js.map +1 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.d.ts +16 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.d.ts.map +1 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.js +13 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.js.map +1 -0
- package/dist/esm/utils/PathClientInternal.d.ts +24 -0
- package/dist/esm/utils/PathClientInternal.d.ts.map +1 -0
- package/dist/esm/utils/PathClientInternal.js +24 -0
- package/dist/esm/utils/PathClientInternal.js.map +1 -0
- package/dist/esm/utils/constants.d.ts +70 -0
- package/dist/esm/utils/constants.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src → dist/esm}/utils/constants.js +85 -67
- package/dist/esm/utils/constants.js.map +1 -0
- package/dist/esm/utils/tracing.d.ts +6 -0
- package/dist/esm/utils/tracing.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src → dist/esm}/utils/tracing.js +2 -2
- package/dist/esm/utils/tracing.js.map +1 -0
- package/dist/esm/utils/utils.common.d.ts +236 -0
- package/dist/esm/utils/utils.common.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src → dist/esm}/utils/utils.common.js +105 -297
- package/dist/esm/utils/utils.common.js.map +1 -0
- package/dist/esm/utils/utils.d.ts +29 -0
- package/dist/esm/utils/utils.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src/utils/utils.node.js → dist/esm/utils/utils.js} +3 -3
- package/dist/esm/utils/utils.js.map +1 -0
- package/dist/react-native/DataLakeFileSystemClient.d.ts +473 -0
- package/dist/react-native/DataLakeFileSystemClient.d.ts.map +1 -0
- package/dist/react-native/DataLakeFileSystemClient.js +679 -0
- package/dist/react-native/DataLakeFileSystemClient.js.map +1 -0
- package/dist/react-native/DataLakeLeaseClient.d.ts +14 -0
- package/dist/react-native/DataLakeLeaseClient.d.ts.map +1 -0
- package/dist/react-native/DataLakeLeaseClient.js +45 -0
- package/dist/react-native/DataLakeLeaseClient.js.map +1 -0
- package/dist/react-native/DataLakeServiceClient.d.ts +281 -0
- package/dist/react-native/DataLakeServiceClient.d.ts.map +1 -0
- package/dist/react-native/DataLakeServiceClient.js +368 -0
- package/dist/react-native/DataLakeServiceClient.js.map +1 -0
- package/dist/react-native/Pipeline.d.ts +52 -0
- package/dist/react-native/Pipeline.d.ts.map +1 -0
- package/dist/react-native/Pipeline.js +216 -0
- package/dist/react-native/Pipeline.js.map +1 -0
- package/dist/react-native/StorageClient.d.ts +61 -0
- package/dist/react-native/StorageClient.d.ts.map +1 -0
- package/dist/react-native/StorageClient.js +51 -0
- package/dist/react-native/StorageClient.js.map +1 -0
- package/dist/react-native/StorageContextClient.d.ts +9 -0
- package/dist/react-native/StorageContextClient.d.ts.map +1 -0
- package/dist/react-native/StorageContextClient.js +35 -0
- package/dist/react-native/StorageContextClient.js.map +1 -0
- package/dist/react-native/clients.d.ts +689 -0
- package/dist/react-native/clients.d.ts.map +1 -0
- package/dist/react-native/clients.js +1189 -0
- package/dist/react-native/clients.js.map +1 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts +2 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js +4 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.js +31 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/react-native/generated/src/index.d.ts +4 -0
- package/dist/react-native/generated/src/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/index.js +11 -0
- package/dist/react-native/generated/src/index.js.map +1 -0
- package/dist/react-native/generated/src/models/index.d.ts +1091 -0
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/index.js +16 -0
- package/dist/react-native/generated/src/models/index.js.map +1 -0
- package/dist/react-native/generated/src/models/mappers.d.ts +53 -0
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/mappers.js +2446 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -0
- package/dist/react-native/generated/src/models/parameters.d.ts +87 -0
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/parameters.js +948 -0
- package/dist/react-native/generated/src/models/parameters.js.map +1 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.d.ts +55 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.js +231 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.js.map +1 -0
- package/dist/react-native/generated/src/operations/index.d.ts +4 -0
- package/dist/react-native/generated/src/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/index.js +11 -0
- package/dist/react-native/generated/src/operations/index.js.map +1 -0
- package/dist/react-native/generated/src/operations/pathOperations.d.ts +120 -0
- package/dist/react-native/generated/src/operations/pathOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/pathOperations.js +591 -0
- package/dist/react-native/generated/src/operations/pathOperations.js.map +1 -0
- package/dist/react-native/generated/src/operations/service.d.ts +18 -0
- package/dist/react-native/generated/src/operations/service.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/service.js +58 -0
- package/dist/react-native/generated/src/operations/service.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/fileSystemOperations.d.ts +47 -0
- package/dist/react-native/generated/src/operationsInterfaces/fileSystemOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/fileSystemOperations.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +4 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js +11 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/pathOperations.d.ts +112 -0
- package/dist/react-native/generated/src/operationsInterfaces/pathOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/pathOperations.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/pathOperations.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.d.ts +10 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/react-native/generated/src/storageClient.d.ts +20 -0
- package/dist/react-native/generated/src/storageClient.d.ts.map +1 -0
- package/dist/react-native/generated/src/storageClient.js +47 -0
- package/dist/react-native/generated/src/storageClient.js.map +1 -0
- package/dist/react-native/index.d.ts +23 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +23 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/log.d.ts +5 -0
- package/dist/react-native/log.d.ts.map +1 -0
- package/dist/react-native/log.js +8 -0
- package/dist/react-native/log.js.map +1 -0
- package/dist/react-native/models.d.ts +1318 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.internal.d.ts +2 -0
- package/dist/react-native/models.internal.d.ts.map +1 -0
- package/dist/react-native/models.internal.js +4 -0
- package/dist/react-native/models.internal.js.map +1 -0
- package/dist/react-native/models.js +53 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/sas/AccountSASPermissions.d.ts +61 -0
- package/dist/react-native/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASPermissions.js +128 -0
- package/dist/react-native/sas/AccountSASPermissions.js.map +1 -0
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASResourceTypes.js +72 -0
- package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/react-native/sas/AccountSASServices.d.ts +40 -0
- package/dist/react-native/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASServices.js +80 -0
- package/dist/react-native/sas/AccountSASServices.js.map +1 -0
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASSignatureValues.js +72 -0
- package/dist/react-native/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/react-native/sas/DataLakeSASPermissions.d.ts +65 -0
- package/dist/react-native/sas/DataLakeSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/DataLakeSASPermissions.js +135 -0
- package/dist/react-native/sas/DataLakeSASPermissions.js.map +1 -0
- package/dist/react-native/sas/DataLakeSASSignatureValues.d.ts +205 -0
- package/dist/react-native/sas/DataLakeSASSignatureValues.d.ts.map +1 -0
- package/dist/react-native/sas/DataLakeSASSignatureValues.js +718 -0
- package/dist/react-native/sas/DataLakeSASSignatureValues.js.map +1 -0
- package/dist/react-native/sas/DirectorySASPermissions.d.ts +69 -0
- package/dist/react-native/sas/DirectorySASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/DirectorySASPermissions.js +145 -0
- package/dist/react-native/sas/DirectorySASPermissions.js.map +1 -0
- package/dist/react-native/sas/FileSystemSASPermissions.d.ts +69 -0
- package/dist/react-native/sas/FileSystemSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/FileSystemSASPermissions.js +145 -0
- package/dist/react-native/sas/FileSystemSASPermissions.js.map +1 -0
- package/dist/react-native/sas/SASQueryParameters.d.ts +309 -0
- package/dist/react-native/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/react-native/sas/SASQueryParameters.js +248 -0
- package/dist/react-native/sas/SASQueryParameters.js.map +1 -0
- package/dist/react-native/sas/SasIPRange.d.ts +24 -0
- package/dist/react-native/sas/SasIPRange.d.ts.map +1 -0
- package/dist/react-native/sas/SasIPRange.js +13 -0
- package/dist/react-native/sas/SasIPRange.js.map +1 -0
- package/dist/react-native/transforms.d.ts +51 -0
- package/dist/react-native/transforms.d.ts.map +1 -0
- package/dist/react-native/transforms.js +337 -0
- package/dist/react-native/transforms.js.map +1 -0
- package/dist/react-native/utils/Batch.d.ts +68 -0
- package/dist/react-native/utils/Batch.d.ts.map +1 -0
- package/dist/react-native/utils/Batch.js +122 -0
- package/dist/react-native/utils/Batch.js.map +1 -0
- package/dist/react-native/utils/BufferScheduler.d.ts +158 -0
- package/dist/react-native/utils/BufferScheduler.d.ts.map +1 -0
- package/dist/react-native/utils/BufferScheduler.js +264 -0
- package/dist/react-native/utils/BufferScheduler.js.map +1 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.d.ts +16 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.d.ts.map +1 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.js +13 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.js.map +1 -0
- package/dist/react-native/utils/PathClientInternal.d.ts +24 -0
- package/dist/react-native/utils/PathClientInternal.d.ts.map +1 -0
- package/dist/react-native/utils/PathClientInternal.js +24 -0
- package/dist/react-native/utils/PathClientInternal.js.map +1 -0
- package/dist/react-native/utils/constants.d.ts +70 -0
- package/dist/react-native/utils/constants.d.ts.map +1 -0
- package/dist/react-native/utils/constants.js +244 -0
- package/dist/react-native/utils/constants.js.map +1 -0
- package/dist/react-native/utils/tracing.d.ts +6 -0
- package/dist/react-native/utils/tracing.d.ts.map +1 -0
- package/dist/react-native/utils/tracing.js +14 -0
- package/dist/react-native/utils/tracing.js.map +1 -0
- package/dist/react-native/utils/utils.common.d.ts +236 -0
- package/dist/react-native/utils/utils.common.d.ts.map +1 -0
- package/dist/react-native/utils/utils.common.js +564 -0
- package/dist/react-native/utils/utils.common.js.map +1 -0
- package/dist/react-native/utils/utils.d.ts +29 -0
- package/dist/react-native/utils/utils.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src/utils/utils.node.js → dist/react-native/utils/utils.js} +4 -51
- package/dist/react-native/utils/utils.js.map +1 -0
- package/package.json +70 -83
- package/dist/index.js +0 -9735
- package/dist/index.js.map +0 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js +0 -19
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js +0 -26
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +0 -1
- package/dist-esm/storage-blob/src/log.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js +0 -20
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js +0 -29
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js +0 -40
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +0 -47
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +0 -31
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js +0 -18
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js +0 -27
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +0 -229
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +0 -180
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +0 -141
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +0 -18
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +0 -132
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/Batch.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +0 -111
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js +0 -65
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +0 -119
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js +0 -73
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/cache.js +0 -11
- package/dist-esm/storage-blob/src/utils/cache.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/constants.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/tracing.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +0 -1
- package/dist-esm/storage-common/src/BufferScheduler.browser.js +0 -8
- package/dist-esm/storage-common/src/BufferScheduler.browser.js.map +0 -1
- package/dist-esm/storage-common/src/BufferScheduler.js.map +0 -1
- package/dist-esm/storage-common/src/BuffersStream.js +0 -83
- package/dist-esm/storage-common/src/BuffersStream.js.map +0 -1
- package/dist-esm/storage-common/src/PooledBuffer.js +0 -87
- package/dist-esm/storage-common/src/PooledBuffer.js.map +0 -1
- package/dist-esm/storage-common/src/index.browser.js +0 -4
- package/dist-esm/storage-common/src/index.browser.js.map +0 -1
- package/dist-esm/storage-common/src/index.js +0 -4
- package/dist-esm/storage-common/src/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/DataLakeLeaseClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/DataLakeServiceClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/Pipeline.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/StorageClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/StorageContextClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/clients.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/credentials/StorageSharedKeyCredential.browser.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/credentials/StorageSharedKeyCredential.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.browser.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/mappers.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/fileSystemOperations.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/pathOperations.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/service.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces/fileSystemOperations.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces/pathOperations.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces/service.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/storageClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/index.browser.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/index.js +0 -23
- package/dist-esm/storage-file-datalake/src/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/log.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/models.internal.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/models.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASPermissions.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASResourceTypes.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASServices.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASSignatureValues.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/DataLakeSASPermissions.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/DataLakeSASSignatureValues.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/DirectorySASPermissions.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/FileSystemSASPermissions.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/SASQueryParameters.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/SasIPRange.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/transforms.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/Batch.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/BufferScheduler.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/DataLakeAclChangeFailedError.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/PathClientInternal.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/constants.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/tracing.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.browser.js +0 -39
- package/dist-esm/storage-file-datalake/src/utils/utils.browser.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.node.js.map +0 -1
- package/types/latest/storage-file-datalake.d.ts +0 -5102
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/models/index.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/models/mappers.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operationsInterfaces/fileSystemOperations.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operationsInterfaces/pathOperations.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operationsInterfaces/service.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/log.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/models.internal.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/AccountSASPermissions.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/AccountSASResourceTypes.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/AccountSASServices.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/DataLakeSASPermissions.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/DirectorySASPermissions.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/FileSystemSASPermissions.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/SasIPRange.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/utils/Batch.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/DataLakeAclChangeFailedError.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/esm}/credentials/StorageSharedKeyCredential.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/esm}/utils/Batch.js +0 -0
|
@@ -0,0 +1,1189 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { isTokenCredential } from "@azure/core-auth";
|
|
4
|
+
import { isNodeLike } from "@azure/core-util";
|
|
5
|
+
import { isPipelineLike, newPipeline } from "./Pipeline.js";
|
|
6
|
+
import { BlobClient, BlockBlobClient } from "@azure/storage-blob";
|
|
7
|
+
import { AnonymousCredential } from "@azure/storage-blob";
|
|
8
|
+
import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential.js";
|
|
9
|
+
import { BufferScheduler } from "@azure/storage-common";
|
|
10
|
+
import { DataLakeLeaseClient } from "./DataLakeLeaseClient.js";
|
|
11
|
+
import { PathOperationsImpl as Path } from "./generated/src/operations/index.js";
|
|
12
|
+
import { generateDataLakeSASQueryParameters, generateDataLakeSASQueryParametersInternal, } from "./sas/DataLakeSASSignatureValues.js";
|
|
13
|
+
import { StorageClient } from "./StorageClient.js";
|
|
14
|
+
import { toAccessControlChangeFailureArray, toAcl, toAclString, toBlobCpkInfo, toPermissions, toPermissionsString, toProperties, } from "./transforms.js";
|
|
15
|
+
import { Batch } from "./utils/Batch.js";
|
|
16
|
+
import { BLOCK_BLOB_MAX_BLOCKS, DEFAULT_HIGH_LEVEL_CONCURRENCY, ETagAny, FILE_MAX_SINGLE_UPLOAD_THRESHOLD, FILE_MAX_SIZE_BYTES, FILE_UPLOAD_DEFAULT_CHUNK_SIZE, FILE_UPLOAD_MAX_CHUNK_SIZE, } from "./utils/constants.js";
|
|
17
|
+
import { DataLakeAclChangeFailedError } from "./utils/DataLakeAclChangeFailedError.js";
|
|
18
|
+
import { tracingClient } from "./utils/tracing.js";
|
|
19
|
+
import { appendToURLPath, appendToURLQuery, assertResponse, ensureCpkIfSpecified, getURLPathAndQuery, ParsePathGetPropertiesExtraHeaderValues, setURLPath, setURLQueries, } from "./utils/utils.common.js";
|
|
20
|
+
import { fsCreateReadStream, fsStat } from "./utils/utils.js";
|
|
21
|
+
/**
|
|
22
|
+
* A DataLakePathClient represents a URL to the Azure Storage path (directory or file).
|
|
23
|
+
*/
|
|
24
|
+
export class DataLakePathClient extends StorageClient {
|
|
25
|
+
/**
|
|
26
|
+
* SetAccessControlRecursiveInternal operation sets the Access Control on a path and sub paths.
|
|
27
|
+
*
|
|
28
|
+
* @param mode - Mode \"set\" sets POSIX access control rights on files and directories,
|
|
29
|
+
* Mode \"modify\" modifies one or more POSIX access control rights that pre-exist on files and directories,
|
|
30
|
+
* Mode \"remove\" removes one or more POSIX access control rights that were present earlier on files and directories.
|
|
31
|
+
* @param acl - The POSIX access control list for the file or directory.
|
|
32
|
+
* @param options - Optional. Options
|
|
33
|
+
*/
|
|
34
|
+
async setAccessControlRecursiveInternal(mode, acl, options = {}) {
|
|
35
|
+
if (options.maxBatches !== undefined && options.maxBatches < 1) {
|
|
36
|
+
throw RangeError(`Options maxBatches must be larger than 0.`);
|
|
37
|
+
}
|
|
38
|
+
if (options.batchSize !== undefined && options.batchSize < 1) {
|
|
39
|
+
throw RangeError(`Options batchSize must be larger than 0.`);
|
|
40
|
+
}
|
|
41
|
+
const result = {
|
|
42
|
+
counters: {
|
|
43
|
+
failedChangesCount: 0,
|
|
44
|
+
changedDirectoriesCount: 0,
|
|
45
|
+
changedFilesCount: 0,
|
|
46
|
+
},
|
|
47
|
+
continuationToken: undefined,
|
|
48
|
+
};
|
|
49
|
+
return tracingClient.withSpan("DataLakePathClient-setAccessControlRecursiveInternal", options, async (updatedOptions) => {
|
|
50
|
+
var _a, _b, _c, _d, _e, _f;
|
|
51
|
+
let continuationToken = options.continuationToken;
|
|
52
|
+
let batchCounter = 0;
|
|
53
|
+
let reachMaxBatches = false;
|
|
54
|
+
do {
|
|
55
|
+
let response;
|
|
56
|
+
try {
|
|
57
|
+
response = await this.pathContext.setAccessControlRecursive(mode, Object.assign(Object.assign({}, updatedOptions), { acl: toAclString(acl), maxRecords: options.batchSize, continuation: continuationToken, forceFlag: options.continueOnFailure }));
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
throw new DataLakeAclChangeFailedError(e, continuationToken);
|
|
61
|
+
}
|
|
62
|
+
batchCounter++;
|
|
63
|
+
continuationToken = response.continuation;
|
|
64
|
+
// Update result
|
|
65
|
+
result.continuationToken = continuationToken;
|
|
66
|
+
result.counters.failedChangesCount += (_a = response.failureCount) !== null && _a !== void 0 ? _a : 0;
|
|
67
|
+
result.counters.changedDirectoriesCount += (_b = response.directoriesSuccessful) !== null && _b !== void 0 ? _b : 0;
|
|
68
|
+
result.counters.changedFilesCount += (_c = response.filesSuccessful) !== null && _c !== void 0 ? _c : 0;
|
|
69
|
+
// Progress event call back
|
|
70
|
+
if (options.onProgress) {
|
|
71
|
+
const progress = {
|
|
72
|
+
batchFailures: toAccessControlChangeFailureArray(response.failedEntries),
|
|
73
|
+
batchCounters: {
|
|
74
|
+
failedChangesCount: (_d = response.failureCount) !== null && _d !== void 0 ? _d : 0,
|
|
75
|
+
changedDirectoriesCount: (_e = response.directoriesSuccessful) !== null && _e !== void 0 ? _e : 0,
|
|
76
|
+
changedFilesCount: (_f = response.filesSuccessful) !== null && _f !== void 0 ? _f : 0,
|
|
77
|
+
},
|
|
78
|
+
aggregateCounters: result.counters,
|
|
79
|
+
continuationToken: continuationToken,
|
|
80
|
+
};
|
|
81
|
+
options.onProgress(progress);
|
|
82
|
+
}
|
|
83
|
+
reachMaxBatches =
|
|
84
|
+
options.maxBatches === undefined ? false : batchCounter >= options.maxBatches;
|
|
85
|
+
} while (continuationToken && !reachMaxBatches);
|
|
86
|
+
return result;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
constructor(url, credentialOrPipeline,
|
|
90
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
91
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
92
|
+
options) {
|
|
93
|
+
if (isPipelineLike(credentialOrPipeline)) {
|
|
94
|
+
super(url, credentialOrPipeline);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
let credential;
|
|
98
|
+
if (credentialOrPipeline === undefined) {
|
|
99
|
+
credential = new AnonymousCredential();
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
credential = credentialOrPipeline;
|
|
103
|
+
}
|
|
104
|
+
const pipeline = newPipeline(credential, options);
|
|
105
|
+
super(url, pipeline);
|
|
106
|
+
}
|
|
107
|
+
this.pathContext = new Path(this.storageClientContext);
|
|
108
|
+
this.blobClient = new BlobClient(this.blobEndpointUrl, this.pipeline);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Name of current file system.
|
|
112
|
+
*
|
|
113
|
+
* @readonly
|
|
114
|
+
*/
|
|
115
|
+
get fileSystemName() {
|
|
116
|
+
return this.blobClient.containerName;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Name of current path (directory or file).
|
|
120
|
+
*
|
|
121
|
+
* @readonly
|
|
122
|
+
*/
|
|
123
|
+
get name() {
|
|
124
|
+
return this.blobClient.name;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Convert current DataLakePathClient to DataLakeDirectoryClient if current path is a directory.
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
131
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */
|
|
132
|
+
toDirectoryClient() {
|
|
133
|
+
return new DataLakeDirectoryClient(this.dfsEndpointUrl, this.pipeline);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Convert current DataLakePathClient to DataLakeFileClient if current path is a file.
|
|
137
|
+
*
|
|
138
|
+
*/
|
|
139
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
140
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */
|
|
141
|
+
toFileClient() {
|
|
142
|
+
return new DataLakeFileClient(this.dfsEndpointUrl, this.pipeline);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Get a {@link DataLakeLeaseClient} that manages leases on the path (directory or file).
|
|
146
|
+
*
|
|
147
|
+
* @param proposeLeaseId - Optional. Initial proposed lease Id.
|
|
148
|
+
*/
|
|
149
|
+
getDataLakeLeaseClient(proposeLeaseId) {
|
|
150
|
+
return new DataLakeLeaseClient(this.blobClient.getBlobLeaseClient(proposeLeaseId));
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Create a directory or path.
|
|
154
|
+
*
|
|
155
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create
|
|
156
|
+
*
|
|
157
|
+
* @param resourceType - Resource type, "directory" or "file".
|
|
158
|
+
* @param options - Optional. Options when creating path.
|
|
159
|
+
*/
|
|
160
|
+
async create(resourceType, options = {}) {
|
|
161
|
+
options.conditions = options.conditions || {};
|
|
162
|
+
return tracingClient.withSpan("DataLakePathClient-create", options, async (updatedOptions) => {
|
|
163
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
|
164
|
+
let expiryOptions;
|
|
165
|
+
let expiresOn;
|
|
166
|
+
if (typeof options.expiresOn === "number" && Number.isFinite(options.expiresOn)) {
|
|
167
|
+
expiryOptions = "RelativeToNow";
|
|
168
|
+
expiresOn = String(Math.round(options.expiresOn));
|
|
169
|
+
}
|
|
170
|
+
else if (options.expiresOn instanceof Date) {
|
|
171
|
+
expiryOptions = "Absolute";
|
|
172
|
+
expiresOn = options.expiresOn.toUTCString();
|
|
173
|
+
}
|
|
174
|
+
else if (options.expiresOn) {
|
|
175
|
+
throw new Error(`Value for expiresOn is invalid: ${options.expiresOn}`);
|
|
176
|
+
}
|
|
177
|
+
return assertResponse(await this.pathContext.create(Object.assign(Object.assign({}, updatedOptions), { resource: resourceType, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, properties: toProperties(options.metadata), cpkInfo: options.customerProvidedKey, acl: options.acl ? toAclString(options.acl) : undefined, expiryOptions,
|
|
178
|
+
expiresOn })));
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Create a directory or file. If the resource already exists, it is not changed.
|
|
183
|
+
*
|
|
184
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create
|
|
185
|
+
*
|
|
186
|
+
* @param resourceType - Resource type, "directory" or "file".
|
|
187
|
+
* @param options -
|
|
188
|
+
*/
|
|
189
|
+
async createIfNotExists(resourceType, options = {}) {
|
|
190
|
+
return tracingClient.withSpan("DataLakePathClient-createIfNotExists", options, async (updatedOptions) => {
|
|
191
|
+
var _a, _b;
|
|
192
|
+
try {
|
|
193
|
+
const conditions = { ifNoneMatch: ETagAny };
|
|
194
|
+
const res = await this.create(resourceType, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
|
|
195
|
+
return Object.assign({ succeeded: true }, res);
|
|
196
|
+
}
|
|
197
|
+
catch (e) {
|
|
198
|
+
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "PathAlreadyExists") {
|
|
199
|
+
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
|
200
|
+
}
|
|
201
|
+
throw e;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Returns true if the Data Lake file represented by this client exists; false otherwise.
|
|
207
|
+
*
|
|
208
|
+
* NOTE: use this function with care since an existing file might be deleted by other clients or
|
|
209
|
+
* applications. Vice versa new files might be added by other clients or applications after this
|
|
210
|
+
* function completes.
|
|
211
|
+
*
|
|
212
|
+
* @param options - options to Exists operation.
|
|
213
|
+
*/
|
|
214
|
+
async exists(options = {}) {
|
|
215
|
+
return tracingClient.withSpan("DataLakeFileClient-exists", options, async (updatedOptions) => {
|
|
216
|
+
return this.blobClient.exists(Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(updatedOptions.customerProvidedKey) }));
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Delete current path (directory or file).
|
|
221
|
+
*
|
|
222
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/delete
|
|
223
|
+
*
|
|
224
|
+
* @param recursive - Required and valid only when the resource is a directory. If "true", all paths beneath the directory will be deleted.
|
|
225
|
+
* @param options - Optional. Options when deleting path.
|
|
226
|
+
*/
|
|
227
|
+
async delete(recursive, options = {}) {
|
|
228
|
+
options.conditions = options.conditions || {};
|
|
229
|
+
return tracingClient.withSpan("DataLakePathClient-delete", options, async (updatedOptions) => {
|
|
230
|
+
if (this.isTokenCredential === undefined) {
|
|
231
|
+
this.isTokenCredential = false;
|
|
232
|
+
this.pipeline.factories.forEach((factory) => {
|
|
233
|
+
if (isTokenCredential(factory.credential)) {
|
|
234
|
+
this.isTokenCredential = true;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
if (isTokenCredential(this.pipeline._credential)) {
|
|
238
|
+
this.isTokenCredential = true;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
const paginated = recursive === true && this.isTokenCredential === true;
|
|
242
|
+
let continuation;
|
|
243
|
+
let response;
|
|
244
|
+
// How to handle long delete loop?
|
|
245
|
+
do {
|
|
246
|
+
response = assertResponse(await this.pathContext.delete(Object.assign(Object.assign({}, updatedOptions), { continuation,
|
|
247
|
+
recursive, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, abortSignal: options.abortSignal, paginated })));
|
|
248
|
+
continuation = response.continuation;
|
|
249
|
+
} while (continuation);
|
|
250
|
+
return response;
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Delete current path (directory or file) if it exists.
|
|
255
|
+
*
|
|
256
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/delete
|
|
257
|
+
*
|
|
258
|
+
* @param recursive - Required and valid only when the resource is a directory. If "true", all paths beneath the directory will be deleted.
|
|
259
|
+
* @param options -
|
|
260
|
+
*/
|
|
261
|
+
async deleteIfExists(recursive, options = {}) {
|
|
262
|
+
options.conditions = options.conditions || {};
|
|
263
|
+
return tracingClient.withSpan("DataLakePathClient-deleteIfExists", options, async (updatedOptions) => {
|
|
264
|
+
var _a, _b;
|
|
265
|
+
try {
|
|
266
|
+
const res = await this.delete(recursive, updatedOptions);
|
|
267
|
+
return Object.assign({ succeeded: true }, res);
|
|
268
|
+
}
|
|
269
|
+
catch (e) {
|
|
270
|
+
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "PathNotFound") {
|
|
271
|
+
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
|
272
|
+
}
|
|
273
|
+
throw e;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Returns the access control data for a path (directory of file).
|
|
279
|
+
*
|
|
280
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/getproperties
|
|
281
|
+
*
|
|
282
|
+
* @param options - Optional. Options when getting file access control.
|
|
283
|
+
*/
|
|
284
|
+
async getAccessControl(options = {}) {
|
|
285
|
+
options.conditions = options.conditions || {};
|
|
286
|
+
return tracingClient.withSpan("DataLakePathClient-getAccessControl", options, async (updatedOptions) => {
|
|
287
|
+
const response = assertResponse(await this.pathContext.getProperties(Object.assign(Object.assign({}, updatedOptions), { action: "getAccessControl", upn: options.userPrincipalName, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, abortSignal: options.abortSignal })));
|
|
288
|
+
return Object.assign(Object.assign({}, response), { _response: response._response, permissions: toPermissions(response.permissions), acl: toAcl(response.acl) });
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Set the access control data for a path (directory of file).
|
|
293
|
+
*
|
|
294
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
295
|
+
*
|
|
296
|
+
* @param acl - The POSIX access control list for the file or directory.
|
|
297
|
+
* @param options - Optional. Options when setting path access control.
|
|
298
|
+
*/
|
|
299
|
+
async setAccessControl(acl, options = {}) {
|
|
300
|
+
options.conditions = options.conditions || {};
|
|
301
|
+
return tracingClient.withSpan("DataLakePathClient-setAccessControl", options, async (updatedOptions) => {
|
|
302
|
+
return assertResponse(await this.pathContext.setAccessControl(Object.assign(Object.assign({}, updatedOptions), { acl: toAclString(acl), leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions })));
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Sets the Access Control on a path and sub paths.
|
|
307
|
+
*
|
|
308
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
309
|
+
*
|
|
310
|
+
* @param acl - The POSIX access control list for the file or directory.
|
|
311
|
+
* @param options - Optional. Options
|
|
312
|
+
*/
|
|
313
|
+
async setAccessControlRecursive(acl, options = {}) {
|
|
314
|
+
return tracingClient.withSpan("DataLakePathClient-setAccessControlRecursive", options, async (updatedOptions) => {
|
|
315
|
+
return this.setAccessControlRecursiveInternal("set", acl, updatedOptions);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Modifies the Access Control on a path and sub paths.
|
|
320
|
+
*
|
|
321
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
322
|
+
*
|
|
323
|
+
* @param acl - The POSIX access control list for the file or directory.
|
|
324
|
+
* @param options - Optional. Options
|
|
325
|
+
*/
|
|
326
|
+
async updateAccessControlRecursive(acl, options = {}) {
|
|
327
|
+
return tracingClient.withSpan("DataLakePathClient-updateAccessControlRecursive", options, async (updatedOptions) => {
|
|
328
|
+
return this.setAccessControlRecursiveInternal("modify", acl, updatedOptions);
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Removes the Access Control on a path and sub paths.
|
|
333
|
+
*
|
|
334
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
335
|
+
*
|
|
336
|
+
* @param acl - The POSIX access control list for the file or directory.
|
|
337
|
+
* @param options - Optional. Options
|
|
338
|
+
*/
|
|
339
|
+
async removeAccessControlRecursive(acl, options = {}) {
|
|
340
|
+
return tracingClient.withSpan("DataLakePathClient-removeAccessControlRecursive", options, async (updatedOptions) => {
|
|
341
|
+
return this.setAccessControlRecursiveInternal("remove", acl, updatedOptions);
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Sets the file permissions on a path.
|
|
346
|
+
*
|
|
347
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
348
|
+
*
|
|
349
|
+
* @param permissions - The POSIX access permissions for the file owner, the file owning group, and others.
|
|
350
|
+
* @param options - Optional. Options when setting path permissions.
|
|
351
|
+
*/
|
|
352
|
+
async setPermissions(permissions, options = {}) {
|
|
353
|
+
options.conditions = options.conditions || {};
|
|
354
|
+
return tracingClient.withSpan("DataLakePathClient-setPermissions", options, async (updatedOptions) => {
|
|
355
|
+
return assertResponse(await this.pathContext.setAccessControl(Object.assign(Object.assign({}, updatedOptions), { permissions: toPermissionsString(permissions), leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions })));
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Returns all user-defined metadata, standard HTTP properties, and system properties
|
|
360
|
+
* for the path (directory or file).
|
|
361
|
+
*
|
|
362
|
+
* WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
|
|
363
|
+
* they originally contained uppercase characters. This differs from the metadata keys returned by
|
|
364
|
+
* the methods of {@link DataLakeFileSystemClient} that list paths using the `includeMetadata` option, which
|
|
365
|
+
* will retain their original casing.
|
|
366
|
+
*
|
|
367
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties
|
|
368
|
+
*
|
|
369
|
+
* @param options - Optional. Options when getting path properties.
|
|
370
|
+
*/
|
|
371
|
+
async getProperties(options = {}) {
|
|
372
|
+
return tracingClient.withSpan("DataLakePathClient-getProperties", options, async (updatedOptions) => {
|
|
373
|
+
const response = await this.blobClient.getProperties(Object.assign(Object.assign({}, options), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
|
|
374
|
+
return ParsePathGetPropertiesExtraHeaderValues(response);
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Sets system properties on the path (directory or file).
|
|
379
|
+
*
|
|
380
|
+
* If no value provided, or no value provided for the specified blob HTTP headers,
|
|
381
|
+
* these blob HTTP headers without a value will be cleared.
|
|
382
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties
|
|
383
|
+
*
|
|
384
|
+
* @param httpHeaders -
|
|
385
|
+
* @param options -
|
|
386
|
+
*/
|
|
387
|
+
async setHttpHeaders(httpHeaders, options = {}) {
|
|
388
|
+
return tracingClient.withSpan("DataLakePathClient-setHttpHeaders", options, async (updatedOptions) => {
|
|
389
|
+
return this.blobClient.setHTTPHeaders({
|
|
390
|
+
blobCacheControl: httpHeaders.cacheControl,
|
|
391
|
+
blobContentType: httpHeaders.contentType,
|
|
392
|
+
blobContentMD5: httpHeaders.contentMD5,
|
|
393
|
+
blobContentEncoding: httpHeaders.contentEncoding,
|
|
394
|
+
blobContentLanguage: httpHeaders.contentLanguage,
|
|
395
|
+
blobContentDisposition: httpHeaders.contentDisposition,
|
|
396
|
+
}, updatedOptions);
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Sets user-defined metadata for the specified path (directory of file) as one or more name-value pairs.
|
|
401
|
+
*
|
|
402
|
+
* If no option provided, or no metadata defined in the parameter, the path
|
|
403
|
+
* metadata will be removed.
|
|
404
|
+
*
|
|
405
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata
|
|
406
|
+
*
|
|
407
|
+
* @param metadata - Optional. Replace existing metadata with this value.
|
|
408
|
+
* If no value provided the existing metadata will be removed.
|
|
409
|
+
* @param options - Optional. Options when setting path metadata.
|
|
410
|
+
*/
|
|
411
|
+
async setMetadata(metadata, options = {}) {
|
|
412
|
+
return tracingClient.withSpan("DataLakePathClient-setMetadata", options, async (updatedOptions) => {
|
|
413
|
+
return this.blobClient.setMetadata(metadata, Object.assign(Object.assign({}, options), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
async move(destinationPathOrFileSystem, destinationPathOrOptions, options) {
|
|
417
|
+
let destinationFileSystem = this.fileSystemName;
|
|
418
|
+
let destinationPath = destinationPathOrFileSystem;
|
|
419
|
+
let pathMoveOptions;
|
|
420
|
+
if (typeof destinationPathOrOptions === "string") {
|
|
421
|
+
destinationFileSystem = destinationPathOrFileSystem;
|
|
422
|
+
destinationPath = destinationPathOrOptions;
|
|
423
|
+
pathMoveOptions = options !== null && options !== void 0 ? options : {};
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
pathMoveOptions = destinationPathOrOptions !== null && destinationPathOrOptions !== void 0 ? destinationPathOrOptions : {};
|
|
427
|
+
}
|
|
428
|
+
const renameSource = getURLPathAndQuery(this.dfsEndpointUrl);
|
|
429
|
+
const split = destinationPath.split("?");
|
|
430
|
+
let destinationUrl;
|
|
431
|
+
if (split.length === 2) {
|
|
432
|
+
const renameDestination = `/${destinationFileSystem}/${split[0]}`;
|
|
433
|
+
destinationUrl = setURLPath(this.dfsEndpointUrl, renameDestination);
|
|
434
|
+
destinationUrl = setURLQueries(destinationUrl, split[1]);
|
|
435
|
+
}
|
|
436
|
+
else if (split.length === 1) {
|
|
437
|
+
const renameDestination = `/${destinationFileSystem}/${destinationPath}`;
|
|
438
|
+
destinationUrl = setURLPath(this.dfsEndpointUrl, renameDestination);
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
throw new RangeError("Destination path should not contain more than one query string");
|
|
442
|
+
}
|
|
443
|
+
const destPathClient = new DataLakePathClient(destinationUrl, this.pipeline);
|
|
444
|
+
return tracingClient.withSpan("DataLakePathClient-move", pathMoveOptions, async (updatedOptions) => {
|
|
445
|
+
var _a, _b, _c, _d, _e;
|
|
446
|
+
return assertResponse(await destPathClient.pathContext.create(Object.assign(Object.assign({}, updatedOptions), { mode: "legacy", // By default
|
|
447
|
+
renameSource, sourceLeaseId: (_a = pathMoveOptions.conditions) === null || _a === void 0 ? void 0 : _a.leaseId, leaseAccessConditions: pathMoveOptions.destinationConditions, sourceModifiedAccessConditions: {
|
|
448
|
+
sourceIfMatch: (_b = pathMoveOptions.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
|
449
|
+
sourceIfNoneMatch: (_c = pathMoveOptions.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
|
|
450
|
+
sourceIfModifiedSince: (_d = pathMoveOptions.conditions) === null || _d === void 0 ? void 0 : _d.ifModifiedSince,
|
|
451
|
+
sourceIfUnmodifiedSince: (_e = pathMoveOptions.conditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
|
452
|
+
}, modifiedAccessConditions: pathMoveOptions.destinationConditions, abortSignal: pathMoveOptions.abortSignal })));
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* A DataLakeDirectoryClient represents a URL to the Azure Storage directory.
|
|
458
|
+
*/
|
|
459
|
+
export class DataLakeDirectoryClient extends DataLakePathClient {
|
|
460
|
+
async create(resourceTypeOrOptions, options = {}) {
|
|
461
|
+
if (resourceTypeOrOptions === "file") {
|
|
462
|
+
throw TypeError(`DataLakeDirectoryClient:create() resourceType cannot be ${resourceTypeOrOptions}. Refer to DataLakeFileClient for file creation.`);
|
|
463
|
+
}
|
|
464
|
+
let pathCreateOptions;
|
|
465
|
+
if (resourceTypeOrOptions === "directory") {
|
|
466
|
+
pathCreateOptions = options;
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
pathCreateOptions = resourceTypeOrOptions !== null && resourceTypeOrOptions !== void 0 ? resourceTypeOrOptions : {};
|
|
470
|
+
}
|
|
471
|
+
return tracingClient.withSpan("DataLakeDirectoryClient-create", pathCreateOptions, async (updatedOptions) => {
|
|
472
|
+
return super.create("directory", updatedOptions);
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
async createIfNotExists(resourceTypeOrOptions, options = {}) {
|
|
476
|
+
if (resourceTypeOrOptions === "file") {
|
|
477
|
+
throw TypeError(`DataLakeDirectoryClient:createIfNotExists() resourceType cannot be ${resourceTypeOrOptions}. Refer to DataLakeFileClient for file creation.`);
|
|
478
|
+
}
|
|
479
|
+
if (resourceTypeOrOptions !== "directory") {
|
|
480
|
+
options = resourceTypeOrOptions || {};
|
|
481
|
+
}
|
|
482
|
+
return tracingClient.withSpan("DataLakeDirectoryClient-createIfNotExists", options, async (updatedOptions) => {
|
|
483
|
+
return super.createIfNotExists("directory", Object.assign({}, updatedOptions));
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Creates a {@link DataLakeDirectoryClient} object under current directory.
|
|
488
|
+
*
|
|
489
|
+
* @param subdirectoryName - Subdirectory name.
|
|
490
|
+
*/
|
|
491
|
+
getSubdirectoryClient(subdirectoryName) {
|
|
492
|
+
return new DataLakeDirectoryClient(appendToURLPath(this.url, encodeURIComponent(subdirectoryName)), this.pipeline);
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Creates a {@link DataLakeFileClient} object under current directory.
|
|
496
|
+
*
|
|
497
|
+
* @param fileName -
|
|
498
|
+
*/
|
|
499
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
500
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */
|
|
501
|
+
getFileClient(fileName) {
|
|
502
|
+
return new DataLakeFileClient(appendToURLPath(this.url, encodeURIComponent(fileName)), this.pipeline);
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Only available for clients constructed with a shared key credential.
|
|
506
|
+
*
|
|
507
|
+
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
508
|
+
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
509
|
+
*
|
|
510
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
511
|
+
*
|
|
512
|
+
* @param options - Optional parameters.
|
|
513
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
514
|
+
*/
|
|
515
|
+
generateSasUrl(options) {
|
|
516
|
+
return new Promise((resolve) => {
|
|
517
|
+
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
|
518
|
+
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
|
519
|
+
}
|
|
520
|
+
const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), this.credential).toString();
|
|
521
|
+
resolve(appendToURLQuery(this.url, sas));
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
526
|
+
* and parameters passed in.
|
|
527
|
+
*
|
|
528
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
529
|
+
*
|
|
530
|
+
* @param options - Optional parameters.
|
|
531
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
532
|
+
*/
|
|
533
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
|
534
|
+
generateSasStringToSign(options) {
|
|
535
|
+
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
|
536
|
+
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
|
537
|
+
}
|
|
538
|
+
return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), this.credential).stringToSign;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
542
|
+
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
543
|
+
*
|
|
544
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
545
|
+
*
|
|
546
|
+
* @param options - Optional parameters.
|
|
547
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
548
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
549
|
+
*/
|
|
550
|
+
generateUserDelegationSasUrl(options, userDelegationKey) {
|
|
551
|
+
return new Promise((resolve) => {
|
|
552
|
+
const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), userDelegationKey, this.accountName).toString();
|
|
553
|
+
resolve(appendToURLQuery(this.url, sas));
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
558
|
+
* and parameters passed in The SAS is signed by the input user delegation key.
|
|
559
|
+
*
|
|
560
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
561
|
+
*
|
|
562
|
+
* @param options - Optional parameters.
|
|
563
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
564
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
565
|
+
*/
|
|
566
|
+
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
|
567
|
+
return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), userDelegationKey, this.accountName).stringToSign;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* A DataLakeFileClient represents a URL to the Azure Storage file.
|
|
572
|
+
*/
|
|
573
|
+
export class DataLakeFileClient extends DataLakePathClient {
|
|
574
|
+
constructor(url, credentialOrPipeline,
|
|
575
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
576
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
577
|
+
options) {
|
|
578
|
+
if (isPipelineLike(credentialOrPipeline)) {
|
|
579
|
+
super(url, credentialOrPipeline);
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
let credential;
|
|
583
|
+
if (credentialOrPipeline === undefined) {
|
|
584
|
+
credential = new AnonymousCredential();
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
credential = credentialOrPipeline;
|
|
588
|
+
}
|
|
589
|
+
const pipeline = newPipeline(credential, options);
|
|
590
|
+
super(url, pipeline);
|
|
591
|
+
}
|
|
592
|
+
this.pathContextInternal = new Path(this.storageClientContext);
|
|
593
|
+
this.blockBlobClientInternal = new BlockBlobClient(this.blobEndpointUrl, this.pipeline);
|
|
594
|
+
this.pathContextInternalToBlobEndpoint = new Path(this.storageClientContextToBlobEndpoint);
|
|
595
|
+
}
|
|
596
|
+
async create(resourceTypeOrOptions, options = {}) {
|
|
597
|
+
if (resourceTypeOrOptions === "directory") {
|
|
598
|
+
throw TypeError(`DataLakeFileClient:create() resourceType cannot be ${resourceTypeOrOptions}. Refer to DataLakeDirectoryClient for directory creation.`);
|
|
599
|
+
}
|
|
600
|
+
let pathCreateOptions;
|
|
601
|
+
if (resourceTypeOrOptions === "file") {
|
|
602
|
+
pathCreateOptions = options;
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
pathCreateOptions = resourceTypeOrOptions !== null && resourceTypeOrOptions !== void 0 ? resourceTypeOrOptions : {};
|
|
606
|
+
}
|
|
607
|
+
return tracingClient.withSpan("DataLakeFileClient-create", pathCreateOptions, async (updatedOptions) => {
|
|
608
|
+
return super.create("file", updatedOptions);
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
async createIfNotExists(resourceTypeOrOptions, options = {}) {
|
|
612
|
+
if (resourceTypeOrOptions === "directory") {
|
|
613
|
+
throw TypeError(`DataLakeFileClient:createIfNotExists() resourceType cannot be ${resourceTypeOrOptions}. Refer to DataLakeDirectoryClient for directory creation.`);
|
|
614
|
+
}
|
|
615
|
+
if (resourceTypeOrOptions !== "file") {
|
|
616
|
+
options = resourceTypeOrOptions || {};
|
|
617
|
+
}
|
|
618
|
+
return tracingClient.withSpan("DataLakeFileClient-createIfNotExists", options, async (updatedOptions) => {
|
|
619
|
+
return super.createIfNotExists("file", updatedOptions);
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Downloads a file from the service, including its metadata and properties.
|
|
624
|
+
*
|
|
625
|
+
* * In Node.js, data returns in a Readable stream readableStreamBody
|
|
626
|
+
* * In browsers, data returns in a promise contentAsBlob
|
|
627
|
+
*
|
|
628
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob
|
|
629
|
+
*
|
|
630
|
+
* * Example usage (Node.js):
|
|
631
|
+
*
|
|
632
|
+
* ```ts snippet:ReadmeSampleDownloadFile_Node
|
|
633
|
+
* import { DataLakeServiceClient } from "@azure/storage-file-datalake";
|
|
634
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
|
635
|
+
*
|
|
636
|
+
* const account = "<account>";
|
|
637
|
+
* const datalakeServiceClient = new DataLakeServiceClient(
|
|
638
|
+
* `https://${account}.dfs.core.windows.net`,
|
|
639
|
+
* new DefaultAzureCredential(),
|
|
640
|
+
* );
|
|
641
|
+
*
|
|
642
|
+
* const fileSystemName = "<file system name>";
|
|
643
|
+
* const fileName = "<file name>";
|
|
644
|
+
* const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);
|
|
645
|
+
* const fileClient = fileSystemClient.getFileClient(fileName);
|
|
646
|
+
*
|
|
647
|
+
* // Get file content from position 0 to the end
|
|
648
|
+
* // In Node.js, get downloaded data by accessing downloadResponse.readableStreamBody
|
|
649
|
+
* const downloadResponse = await fileClient.read();
|
|
650
|
+
* if (downloadResponse.readableStreamBody) {
|
|
651
|
+
* const downloaded = await streamToBuffer(downloadResponse.readableStreamBody);
|
|
652
|
+
* console.log("Downloaded file content:", downloaded.toString());
|
|
653
|
+
* }
|
|
654
|
+
*
|
|
655
|
+
* // [Node.js only] A helper method used to read a Node.js readable stream into a Buffer.
|
|
656
|
+
* async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise<Buffer> {
|
|
657
|
+
* return new Promise((resolve, reject) => {
|
|
658
|
+
* const chunks: Buffer[] = [];
|
|
659
|
+
* readableStream.on("data", (data) => {
|
|
660
|
+
* chunks.push(data instanceof Buffer ? data : Buffer.from(data));
|
|
661
|
+
* });
|
|
662
|
+
* readableStream.on("end", () => {
|
|
663
|
+
* resolve(Buffer.concat(chunks));
|
|
664
|
+
* });
|
|
665
|
+
* readableStream.on("error", reject);
|
|
666
|
+
* });
|
|
667
|
+
* }
|
|
668
|
+
* ```
|
|
669
|
+
*
|
|
670
|
+
* Example usage (browser):
|
|
671
|
+
*
|
|
672
|
+
* ```ts snippet:ReadmeSampleDownloadFile_Browser
|
|
673
|
+
* import { DataLakeServiceClient } from "@azure/storage-file-datalake";
|
|
674
|
+
*
|
|
675
|
+
* const account = "<account>";
|
|
676
|
+
* const sas = "<sas token>";
|
|
677
|
+
* const datalakeServiceClient = new DataLakeServiceClient(
|
|
678
|
+
* `https://${account}.dfs.core.windows.net${sas}`,
|
|
679
|
+
* );
|
|
680
|
+
*
|
|
681
|
+
* const fileSystemName = "<file system name>";
|
|
682
|
+
* const fileName = "<file name>";
|
|
683
|
+
* const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);
|
|
684
|
+
* const fileClient = fileSystemClient.getFileClient(fileName);
|
|
685
|
+
*
|
|
686
|
+
* // Get file content from position 0 to the end
|
|
687
|
+
* // In browsers, get downloaded data by accessing downloadResponse.contentAsBlob
|
|
688
|
+
* const downloadResponse = await fileClient.read();
|
|
689
|
+
* if (downloadResponse.contentAsBlob) {
|
|
690
|
+
* const blob = await downloadResponse.contentAsBlob;
|
|
691
|
+
* const downloaded = await blob.text();
|
|
692
|
+
* console.log(`Downloaded file content ${downloaded}`);
|
|
693
|
+
* }
|
|
694
|
+
* ```
|
|
695
|
+
*
|
|
696
|
+
* @param offset - Optional. Offset to read file, default value is 0.
|
|
697
|
+
* @param count - Optional. How many bytes to read, default will read from offset to the end.
|
|
698
|
+
* @param options - Optional. Options when reading file.
|
|
699
|
+
*/
|
|
700
|
+
async read(offset = 0, count, options = {}) {
|
|
701
|
+
return tracingClient.withSpan("DataLakeFileClient-read", options, async (updatedOptions) => {
|
|
702
|
+
const rawResponse = await this.blockBlobClientInternal.download(offset, count, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(updatedOptions.customerProvidedKey) }));
|
|
703
|
+
const response = ParsePathGetPropertiesExtraHeaderValues(rawResponse);
|
|
704
|
+
if (!isNodeLike && !response.contentAsBlob) {
|
|
705
|
+
response.contentAsBlob = rawResponse.blobBody;
|
|
706
|
+
}
|
|
707
|
+
response.fileContentMD5 = rawResponse.blobContentMD5;
|
|
708
|
+
response._response.parsedHeaders.fileContentMD5 =
|
|
709
|
+
rawResponse._response.parsedHeaders.blobContentMD5;
|
|
710
|
+
delete rawResponse.blobContentMD5;
|
|
711
|
+
delete rawResponse._response.parsedHeaders.blobContentMD5;
|
|
712
|
+
return response;
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Uploads data to be appended to a file. Data can only be appended to a file.
|
|
717
|
+
* To apply perviously uploaded data to a file, call flush.
|
|
718
|
+
*
|
|
719
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
720
|
+
*
|
|
721
|
+
* @param body - Content to be uploaded.
|
|
722
|
+
* @param offset - Append offset in bytes.
|
|
723
|
+
* @param length - Length of content to append in bytes.
|
|
724
|
+
* @param options - Optional. Options when appending data.
|
|
725
|
+
*/
|
|
726
|
+
async append(body, offset, length, options = {}) {
|
|
727
|
+
options.conditions = options.conditions || {};
|
|
728
|
+
return tracingClient.withSpan("DataLakeFileClient-append", options, async (updatedOptions) => {
|
|
729
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
|
730
|
+
return assertResponse(await this.pathContextInternal.appendData(body, Object.assign(Object.assign({}, updatedOptions), { pathHttpHeaders: {
|
|
731
|
+
contentMD5: options.transactionalContentMD5,
|
|
732
|
+
}, abortSignal: options.abortSignal, position: offset, contentLength: length, leaseAccessConditions: options.conditions, requestOptions: {
|
|
733
|
+
onUploadProgress: options.onProgress,
|
|
734
|
+
}, cpkInfo: options.customerProvidedKey, flush: options.flush, proposedLeaseId: options.proposedLeaseId, leaseDuration: options.leaseDurationInSeconds, leaseAction: options.leaseAction })));
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Flushes (writes) previously appended data to a file.
|
|
739
|
+
*
|
|
740
|
+
* @param position - File position to flush.
|
|
741
|
+
* This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file.
|
|
742
|
+
* It is required when uploading data to be appended to the file and when flushing previously uploaded data to the file.
|
|
743
|
+
* The value must be the position where the data is to be appended. Uploaded data is not immediately flushed, or written,
|
|
744
|
+
* to the file. To flush, the previously uploaded data must be contiguous, the position parameter must be specified and
|
|
745
|
+
* equal to the length of the file after all data has been written, and there must not be a request entity body included
|
|
746
|
+
* with the request.
|
|
747
|
+
* @param options - Optional. Options when flushing data.
|
|
748
|
+
*/
|
|
749
|
+
async flush(position, options = {}) {
|
|
750
|
+
options.conditions = options.conditions || {};
|
|
751
|
+
return tracingClient.withSpan("DataLakeFileClient-flush", options, async (updatedOptions) => {
|
|
752
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
|
753
|
+
return assertResponse(await this.pathContextInternal.flushData(Object.assign(Object.assign({}, updatedOptions), { position, contentLength: 0, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, proposedLeaseId: options.proposedLeaseId, leaseDuration: options.leaseDurationInSeconds, leaseAction: options.leaseAction })));
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
// high level functions
|
|
757
|
+
/**
|
|
758
|
+
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
759
|
+
*
|
|
760
|
+
* Uploads a local file to a Data Lake file.
|
|
761
|
+
*
|
|
762
|
+
* @param filePath - Full path of the local file
|
|
763
|
+
* @param options -
|
|
764
|
+
*/
|
|
765
|
+
async uploadFile(filePath,
|
|
766
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
767
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
768
|
+
options = {}) {
|
|
769
|
+
return tracingClient.withSpan("DataLakeFileClient-uploadFile", options, async (updatedOptions) => {
|
|
770
|
+
const size = (await fsStat(filePath)).size;
|
|
771
|
+
return this.uploadSeekableInternal((offset, contentSize) => {
|
|
772
|
+
return () => fsCreateReadStream(filePath, {
|
|
773
|
+
autoClose: true,
|
|
774
|
+
end: offset + contentSize - 1,
|
|
775
|
+
start: offset,
|
|
776
|
+
});
|
|
777
|
+
}, size, updatedOptions);
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Uploads a Buffer(Node.js)/Blob/ArrayBuffer/ArrayBufferView to a File.
|
|
782
|
+
*
|
|
783
|
+
* @param data - Buffer(Node), Blob, ArrayBuffer or ArrayBufferView
|
|
784
|
+
* @param options -
|
|
785
|
+
*/
|
|
786
|
+
async upload(data, options = {}) {
|
|
787
|
+
return tracingClient.withSpan("DataLakeFileClient-upload", options, async (updatedOptions) => {
|
|
788
|
+
if (isNodeLike) {
|
|
789
|
+
let buffer;
|
|
790
|
+
if (data instanceof Buffer) {
|
|
791
|
+
buffer = data;
|
|
792
|
+
}
|
|
793
|
+
else if (data instanceof ArrayBuffer) {
|
|
794
|
+
buffer = Buffer.from(data);
|
|
795
|
+
}
|
|
796
|
+
else {
|
|
797
|
+
data = data;
|
|
798
|
+
buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
|
799
|
+
}
|
|
800
|
+
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.length, updatedOptions);
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
const browserBlob = new Blob([data]);
|
|
804
|
+
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
|
|
805
|
+
}
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
async uploadSeekableInternal(bodyFactory, size, options = {}) {
|
|
809
|
+
return tracingClient.withSpan("DataLakeFileClient-uploadData", options, async (updatedOptions) => {
|
|
810
|
+
var _a;
|
|
811
|
+
if (size > FILE_MAX_SIZE_BYTES) {
|
|
812
|
+
throw new RangeError(`size must be <= ${FILE_MAX_SIZE_BYTES}.`);
|
|
813
|
+
}
|
|
814
|
+
// Create the file.
|
|
815
|
+
const createRes = this.create({
|
|
816
|
+
abortSignal: options.abortSignal,
|
|
817
|
+
metadata: options.metadata,
|
|
818
|
+
permissions: options.permissions,
|
|
819
|
+
umask: options.umask,
|
|
820
|
+
conditions: options.conditions,
|
|
821
|
+
pathHttpHeaders: options.pathHttpHeaders,
|
|
822
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
823
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
824
|
+
encryptionContext: updatedOptions.encryptionContext,
|
|
825
|
+
});
|
|
826
|
+
// append() with empty data would return error, so do not continue
|
|
827
|
+
if (size === 0) {
|
|
828
|
+
return createRes;
|
|
829
|
+
}
|
|
830
|
+
else {
|
|
831
|
+
await createRes;
|
|
832
|
+
}
|
|
833
|
+
// After the File is Create, Lease ID is the only valid request parameter.
|
|
834
|
+
options.conditions = { leaseId: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.leaseId };
|
|
835
|
+
if (!options.chunkSize) {
|
|
836
|
+
options.chunkSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);
|
|
837
|
+
if (options.chunkSize < FILE_UPLOAD_DEFAULT_CHUNK_SIZE) {
|
|
838
|
+
options.chunkSize = FILE_UPLOAD_DEFAULT_CHUNK_SIZE;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
if (options.chunkSize < 1 || options.chunkSize > FILE_UPLOAD_MAX_CHUNK_SIZE) {
|
|
842
|
+
throw new RangeError(`chunkSize option must be >= 1 and <= ${FILE_UPLOAD_MAX_CHUNK_SIZE}`);
|
|
843
|
+
}
|
|
844
|
+
if (!options.maxConcurrency) {
|
|
845
|
+
options.maxConcurrency = DEFAULT_HIGH_LEVEL_CONCURRENCY;
|
|
846
|
+
}
|
|
847
|
+
if (options.maxConcurrency <= 0) {
|
|
848
|
+
throw new RangeError(`maxConcurrency must be > 0.`);
|
|
849
|
+
}
|
|
850
|
+
if (!options.singleUploadThreshold) {
|
|
851
|
+
options.singleUploadThreshold = FILE_MAX_SINGLE_UPLOAD_THRESHOLD;
|
|
852
|
+
}
|
|
853
|
+
if (options.singleUploadThreshold < 1 ||
|
|
854
|
+
options.singleUploadThreshold > FILE_MAX_SINGLE_UPLOAD_THRESHOLD) {
|
|
855
|
+
throw new RangeError(`singleUploadThreshold option must be >= 1 and <= ${FILE_MAX_SINGLE_UPLOAD_THRESHOLD}`);
|
|
856
|
+
}
|
|
857
|
+
// When buffer length <= singleUploadThreshold, this method will use one append/flush call to finish the upload.
|
|
858
|
+
if (size <= options.singleUploadThreshold) {
|
|
859
|
+
await this.append(bodyFactory(0, size), 0, size, {
|
|
860
|
+
abortSignal: options.abortSignal,
|
|
861
|
+
conditions: options.conditions,
|
|
862
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
863
|
+
onProgress: options.onProgress,
|
|
864
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
865
|
+
});
|
|
866
|
+
return this.flush(size, {
|
|
867
|
+
abortSignal: options.abortSignal,
|
|
868
|
+
conditions: options.conditions,
|
|
869
|
+
close: options.close,
|
|
870
|
+
pathHttpHeaders: options.pathHttpHeaders,
|
|
871
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
872
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
const numBlocks = Math.floor((size - 1) / options.chunkSize) + 1;
|
|
876
|
+
if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {
|
|
877
|
+
throw new RangeError(`The data's size is too big or the chunkSize is too small;` +
|
|
878
|
+
`the number of chunks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`);
|
|
879
|
+
}
|
|
880
|
+
let transferProgress = 0;
|
|
881
|
+
const batch = new Batch(options.maxConcurrency);
|
|
882
|
+
for (let i = 0; i < numBlocks; i++) {
|
|
883
|
+
batch.addOperation(async () => {
|
|
884
|
+
const start = options.chunkSize * i;
|
|
885
|
+
const end = i === numBlocks - 1 ? size : start + options.chunkSize;
|
|
886
|
+
const contentLength = end - start;
|
|
887
|
+
await this.append(bodyFactory(start, contentLength), start, contentLength, {
|
|
888
|
+
abortSignal: options.abortSignal,
|
|
889
|
+
conditions: options.conditions,
|
|
890
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
891
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
892
|
+
});
|
|
893
|
+
transferProgress += contentLength;
|
|
894
|
+
if (options.onProgress) {
|
|
895
|
+
options.onProgress({ loadedBytes: transferProgress });
|
|
896
|
+
}
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
await batch.do();
|
|
900
|
+
return this.flush(size, {
|
|
901
|
+
abortSignal: options.abortSignal,
|
|
902
|
+
conditions: options.conditions,
|
|
903
|
+
close: options.close,
|
|
904
|
+
pathHttpHeaders: options.pathHttpHeaders,
|
|
905
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
906
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
907
|
+
});
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
912
|
+
*
|
|
913
|
+
* Uploads a Node.js Readable stream into a Data Lake file.
|
|
914
|
+
* This method will try to create a file, then starts uploading chunk by chunk.
|
|
915
|
+
* Please make sure potential size of stream doesn't exceed FILE_MAX_SIZE_BYTES and
|
|
916
|
+
* potential number of chunks doesn't exceed BLOCK_BLOB_MAX_BLOCKS.
|
|
917
|
+
*
|
|
918
|
+
* PERFORMANCE IMPROVEMENT TIPS:
|
|
919
|
+
* * Input stream highWaterMark is better to set a same value with options.chunkSize
|
|
920
|
+
* parameter, which will avoid Buffer.concat() operations.
|
|
921
|
+
*
|
|
922
|
+
* @param stream - Node.js Readable stream.
|
|
923
|
+
* @param options -
|
|
924
|
+
*/
|
|
925
|
+
async uploadStream(stream, options = {}) {
|
|
926
|
+
return tracingClient.withSpan("DataLakeFileClient-uploadStream", options, async (updatedOptions) => {
|
|
927
|
+
var _a;
|
|
928
|
+
// Create the file
|
|
929
|
+
await this.create({
|
|
930
|
+
abortSignal: options.abortSignal,
|
|
931
|
+
metadata: options.metadata,
|
|
932
|
+
permissions: options.permissions,
|
|
933
|
+
umask: options.umask,
|
|
934
|
+
conditions: options.conditions,
|
|
935
|
+
pathHttpHeaders: options.pathHttpHeaders,
|
|
936
|
+
customerProvidedKey: options.customerProvidedKey,
|
|
937
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
938
|
+
encryptionContext: updatedOptions.encryptionContext,
|
|
939
|
+
});
|
|
940
|
+
// After the File is Create, Lease ID is the only valid request parameter.
|
|
941
|
+
options.conditions = { leaseId: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.leaseId };
|
|
942
|
+
if (!options.chunkSize) {
|
|
943
|
+
options.chunkSize = FILE_UPLOAD_DEFAULT_CHUNK_SIZE;
|
|
944
|
+
}
|
|
945
|
+
if (options.chunkSize < 1 || options.chunkSize > FILE_UPLOAD_MAX_CHUNK_SIZE) {
|
|
946
|
+
throw new RangeError(`chunkSize option must be >= 1 and <= ${FILE_UPLOAD_MAX_CHUNK_SIZE}`);
|
|
947
|
+
}
|
|
948
|
+
if (!options.maxConcurrency) {
|
|
949
|
+
options.maxConcurrency = DEFAULT_HIGH_LEVEL_CONCURRENCY;
|
|
950
|
+
}
|
|
951
|
+
if (options.maxConcurrency <= 0) {
|
|
952
|
+
throw new RangeError(`maxConcurrency must be > 0.`);
|
|
953
|
+
}
|
|
954
|
+
let transferProgress = 0;
|
|
955
|
+
const scheduler = new BufferScheduler(stream, options.chunkSize, options.maxConcurrency, async (body, length, offset) => {
|
|
956
|
+
await this.append(body, offset, length, {
|
|
957
|
+
abortSignal: options.abortSignal,
|
|
958
|
+
conditions: options.conditions,
|
|
959
|
+
customerProvidedKey: options.customerProvidedKey,
|
|
960
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
961
|
+
});
|
|
962
|
+
// Update progress after block is successfully uploaded to server, in case of block trying
|
|
963
|
+
transferProgress += length;
|
|
964
|
+
if (options.onProgress) {
|
|
965
|
+
options.onProgress({ loadedBytes: transferProgress });
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
// concurrency should set a smaller value than maxConcurrency, which is helpful to
|
|
969
|
+
// reduce the possibility when a outgoing handler waits for stream data, in
|
|
970
|
+
// this situation, outgoing handlers are blocked.
|
|
971
|
+
// Outgoing queue shouldn't be empty.
|
|
972
|
+
Math.ceil((options.maxConcurrency / 4) * 3));
|
|
973
|
+
await scheduler.do();
|
|
974
|
+
return this.flush(transferProgress, {
|
|
975
|
+
abortSignal: options.abortSignal,
|
|
976
|
+
conditions: options.conditions,
|
|
977
|
+
close: options.close,
|
|
978
|
+
pathHttpHeaders: options.pathHttpHeaders,
|
|
979
|
+
customerProvidedKey: options.customerProvidedKey,
|
|
980
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
981
|
+
});
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
async readToBuffer(bufferOrOffset, offsetOrCount, countOrOptions, optOptions = {}) {
|
|
985
|
+
let buffer = undefined;
|
|
986
|
+
let offset = 0;
|
|
987
|
+
let count = 0;
|
|
988
|
+
let options = optOptions;
|
|
989
|
+
if (bufferOrOffset instanceof Buffer) {
|
|
990
|
+
buffer = bufferOrOffset;
|
|
991
|
+
offset = offsetOrCount || 0;
|
|
992
|
+
count = typeof countOrOptions === "number" ? countOrOptions : 0;
|
|
993
|
+
}
|
|
994
|
+
else {
|
|
995
|
+
offset = typeof bufferOrOffset === "number" ? bufferOrOffset : 0;
|
|
996
|
+
count = typeof offsetOrCount === "number" ? offsetOrCount : 0;
|
|
997
|
+
options = countOrOptions || {};
|
|
998
|
+
}
|
|
999
|
+
return tracingClient.withSpan("DataLakeFileClient-readToBuffer", options, async (updatedOptions) => {
|
|
1000
|
+
if (buffer) {
|
|
1001
|
+
return this.blockBlobClientInternal.downloadToBuffer(buffer, offset, count, Object.assign(Object.assign({}, options), { maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk, blockSize: options.chunkSize, customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
|
|
1002
|
+
}
|
|
1003
|
+
else {
|
|
1004
|
+
return this.blockBlobClientInternal.downloadToBuffer(offset, count, Object.assign(Object.assign({}, options), { maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk, blockSize: options.chunkSize, customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
1010
|
+
*
|
|
1011
|
+
* Downloads a Data Lake file to a local file.
|
|
1012
|
+
* Fails if the the given file path already exits.
|
|
1013
|
+
* Offset and count are optional, pass 0 and undefined respectively to download the entire file.
|
|
1014
|
+
*
|
|
1015
|
+
* @param filePath -
|
|
1016
|
+
* @param offset - From which position of the file to download.
|
|
1017
|
+
* @param count - How much data to be downloaded. Will download to the end when passing undefined.
|
|
1018
|
+
* @param options - Options to read Data Lake file.
|
|
1019
|
+
* @returns The response data for file read operation,
|
|
1020
|
+
* but with readableStreamBody set to undefined since its
|
|
1021
|
+
* content is already read and written into a local file
|
|
1022
|
+
* at the specified path.
|
|
1023
|
+
*/
|
|
1024
|
+
async readToFile(filePath, offset = 0, count, options = {}) {
|
|
1025
|
+
return tracingClient.withSpan("DataLakeFileClient-readToFile", options, async (updatedOptions) => {
|
|
1026
|
+
const rawResposne = await this.blockBlobClientInternal.downloadToFile(filePath, offset, count, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey) }));
|
|
1027
|
+
const response = ParsePathGetPropertiesExtraHeaderValues(rawResposne);
|
|
1028
|
+
return response;
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
/**
|
|
1032
|
+
* Quick query for a JSON or CSV formatted file.
|
|
1033
|
+
*
|
|
1034
|
+
* Example usage (Node.js):
|
|
1035
|
+
*
|
|
1036
|
+
* ```ts snippet:ReadmeSampleQueryFile_Node
|
|
1037
|
+
* import { DataLakeServiceClient } from "@azure/storage-file-datalake";
|
|
1038
|
+
*
|
|
1039
|
+
* const account = "<account>";
|
|
1040
|
+
* const sas = "<sas token>";
|
|
1041
|
+
* const datalakeServiceClient = new DataLakeServiceClient(
|
|
1042
|
+
* `https://${account}.dfs.core.windows.net${sas}`,
|
|
1043
|
+
* );
|
|
1044
|
+
*
|
|
1045
|
+
* const fileSystemName = "<file system name>";
|
|
1046
|
+
* const fileName = "<file name>";
|
|
1047
|
+
* const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);
|
|
1048
|
+
* const fileClient = fileSystemClient.getFileClient(fileName);
|
|
1049
|
+
*
|
|
1050
|
+
* // Query and convert a file to a string
|
|
1051
|
+
* const queryResponse = await fileClient.query("select * from BlobStorage");
|
|
1052
|
+
* if (queryResponse.readableStreamBody) {
|
|
1053
|
+
* const responseBuffer = await streamToBuffer(queryResponse.readableStreamBody);
|
|
1054
|
+
* const downloaded = responseBuffer.toString();
|
|
1055
|
+
* console.log(`Query file content: ${downloaded}`);
|
|
1056
|
+
* }
|
|
1057
|
+
*
|
|
1058
|
+
* async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise<Buffer> {
|
|
1059
|
+
* return new Promise((resolve, reject) => {
|
|
1060
|
+
* const chunks: Buffer[] = [];
|
|
1061
|
+
* readableStream.on("data", (data) => {
|
|
1062
|
+
* chunks.push(data instanceof Buffer ? data : Buffer.from(data));
|
|
1063
|
+
* });
|
|
1064
|
+
* readableStream.on("end", () => {
|
|
1065
|
+
* resolve(Buffer.concat(chunks));
|
|
1066
|
+
* });
|
|
1067
|
+
* readableStream.on("error", reject);
|
|
1068
|
+
* });
|
|
1069
|
+
* }
|
|
1070
|
+
* ```
|
|
1071
|
+
*
|
|
1072
|
+
* @param query -
|
|
1073
|
+
* @param options -
|
|
1074
|
+
*/
|
|
1075
|
+
async query(query, options = {}) {
|
|
1076
|
+
return tracingClient.withSpan("DataLakeFileClient-query", options, async (updatedOptions) => {
|
|
1077
|
+
const rawResponse = await this.blockBlobClientInternal.query(query, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey) }));
|
|
1078
|
+
const response = rawResponse;
|
|
1079
|
+
if (!isNodeLike && !response.contentAsBlob) {
|
|
1080
|
+
response.contentAsBlob = rawResponse.blobBody;
|
|
1081
|
+
}
|
|
1082
|
+
response.fileContentMD5 = rawResponse.blobContentMD5;
|
|
1083
|
+
response._response.parsedHeaders.fileContentMD5 =
|
|
1084
|
+
rawResponse._response.parsedHeaders.blobContentMD5;
|
|
1085
|
+
delete rawResponse.blobContentMD5;
|
|
1086
|
+
delete rawResponse._response.parsedHeaders.blobContentMD5;
|
|
1087
|
+
return response;
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Sets an expiry time on a file, once that time is met the file is deleted.
|
|
1092
|
+
*
|
|
1093
|
+
* @param mode -
|
|
1094
|
+
* @param options -
|
|
1095
|
+
*/
|
|
1096
|
+
async setExpiry(mode, options = {}) {
|
|
1097
|
+
return tracingClient.withSpan("DataLakeFileClient-setExpiry", options, async (updatedOptions) => {
|
|
1098
|
+
var _a;
|
|
1099
|
+
let expiresOn = undefined;
|
|
1100
|
+
if (mode === "RelativeToNow" || mode === "RelativeToCreation") {
|
|
1101
|
+
if (!options.timeToExpireInMs) {
|
|
1102
|
+
throw new Error(`Should specify options.timeToExpireInMs when using mode ${mode}.`);
|
|
1103
|
+
}
|
|
1104
|
+
// MINOR: need check against <= 2**64, but JS number has the precision problem.
|
|
1105
|
+
expiresOn = Math.round(options.timeToExpireInMs).toString();
|
|
1106
|
+
}
|
|
1107
|
+
if (mode === "Absolute") {
|
|
1108
|
+
if (!options.expiresOn) {
|
|
1109
|
+
throw new Error(`Should specify options.expiresOn when using mode ${mode}.`);
|
|
1110
|
+
}
|
|
1111
|
+
const now = new Date();
|
|
1112
|
+
if (!(options.expiresOn.getTime() > now.getTime())) {
|
|
1113
|
+
throw new Error(`options.expiresOn should be later than now: ${now.toUTCString()} when using mode ${mode}, but is ${(_a = options.expiresOn) === null || _a === void 0 ? void 0 : _a.toUTCString()}`);
|
|
1114
|
+
}
|
|
1115
|
+
expiresOn = options.expiresOn.toUTCString();
|
|
1116
|
+
}
|
|
1117
|
+
const adaptedOptions = Object.assign(Object.assign({}, options), { expiresOn });
|
|
1118
|
+
return assertResponse(await this.pathContextInternalToBlobEndpoint.setExpiry(mode, Object.assign(Object.assign({}, adaptedOptions), { tracingOptions: updatedOptions.tracingOptions })));
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* Only available for clients constructed with a shared key credential.
|
|
1123
|
+
*
|
|
1124
|
+
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1125
|
+
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
1126
|
+
*
|
|
1127
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
1128
|
+
*
|
|
1129
|
+
* @param options - Optional parameters.
|
|
1130
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
1131
|
+
*/
|
|
1132
|
+
generateSasUrl(options) {
|
|
1133
|
+
return new Promise((resolve) => {
|
|
1134
|
+
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
|
1135
|
+
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
|
1136
|
+
}
|
|
1137
|
+
const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), this.credential).toString();
|
|
1138
|
+
resolve(appendToURLQuery(this.url, sas));
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Only available for clients constructed with a shared key credential.
|
|
1143
|
+
*
|
|
1144
|
+
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1145
|
+
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
1146
|
+
*
|
|
1147
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
1148
|
+
*
|
|
1149
|
+
* @param options - Optional parameters.
|
|
1150
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
1151
|
+
*/
|
|
1152
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
|
1153
|
+
generateSasStringToSign(options) {
|
|
1154
|
+
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
|
1155
|
+
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
|
1156
|
+
}
|
|
1157
|
+
return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), this.credential).stringToSign;
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1161
|
+
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
1162
|
+
*
|
|
1163
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
1164
|
+
*
|
|
1165
|
+
* @param options - Optional parameters.
|
|
1166
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
1167
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
1168
|
+
*/
|
|
1169
|
+
generateUserDelegationSasUrl(options, userDelegationKey) {
|
|
1170
|
+
return new Promise((resolve) => {
|
|
1171
|
+
const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), userDelegationKey, this.accountName).toString();
|
|
1172
|
+
resolve(appendToURLQuery(this.url, sas));
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1177
|
+
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
1178
|
+
*
|
|
1179
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
1180
|
+
*
|
|
1181
|
+
* @param options - Optional parameters.
|
|
1182
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
1183
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
1184
|
+
*/
|
|
1185
|
+
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
|
1186
|
+
return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), userDelegationKey, this.accountName).stringToSign;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
//# sourceMappingURL=clients.js.map
|