Creates an instance of DataLakeFileSystemClient from url and credential.
A Client string pointing to Azure Storage data lake file system, such as "https://myaccount.dfs.core.windows.net/filesystem". You can append a SAS if using AnonymousCredential, such as "https://myaccount.dfs.core.windows.net/filesystem?sasString".
Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity
package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
Optional. Options to configure the HTTP pipeline.
Creates an instance of DataLakeFileSystemClient from url and pipeline.
A Client string pointing to Azure Storage data lake file system, such as "https://myaccount.dfs.core.windows.net/filesystem". You can append a SAS if using AnonymousCredential, such as "https://myaccount.dfs.core.windows.net/filesystem?sasString".
Call newPipeline() to create a default pipeline, or provide a customized pipeline.
Encoded URL string value for corresponding blob endpoint.
Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity
package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
Encoded URL string value for corresponding dfs endpoint.
Request policy pipeline.
StorageClient is a reference to protocol layer operations entry, which is generated by AutoRest generator.
storageClientContextWithBlobEndpoint is a reference to protocol layer operations entry, which is generated by AutoRest generator, with its url pointing to the Blob endpoint.
Encoded URL string value.
Name of current file system.
Creates a new file system under the specified account. If the file system with the same name already exists, the operation fails.
Optional. Options when creating file system.
Creates a new file system under the specified account. If the file system with the same name already exists, it is not changed.
-
Delete current file system.
Optional. Options when deleting file system.
Delete current file system if it exists.
-
Returns true if the File system represented by this client exists; false otherwise.
NOTE: use this function with care since an existing file system might be deleted by other clients or applications. Vice versa new file system with the same name might be added by other clients or applications after this function completes.
-
Only available for DataLakeFileSystemClient constructed with a shared key credential.
Generates a Service Shared Access Signature (SAS) URI based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
Optional parameters.
The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
Gets the permissions for the specified file system. The permissions indicate whether file system data may be accessed publicly.
WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z".
Optional. Options when getting file system access policy.
Get a DataLakeLeaseClient that manages leases on the file system.
Optional. Initial proposed lease Id.
Creates a DataLakeDirectoryClient object under current file system.
-
Creates a DataLakeFileClient object under current file system.
-
Returns all user-defined metadata and system properties for the specified file system.
WARNING: The metadata
object returned in the response will have its keys in lowercase, even if
they originally contained uppercase characters. This differs from the metadata keys returned by
the listFileSystems
method of DataLakeServiceClient using the includeMetadata
option, which
will retain their original casing.
Optional. Options when getting file system properties.
Returns an async iterable iterator to list all the paths (directories and files) under the specified file system.
.byPage() returns an async iterable iterator to list the paths in pages.
Example using for await
syntax:
// Get the fileSystemClient before you run these snippets,
// Can be obtained from `serviceClient.getFileSystemClient("<your-filesystem-name>");`
let i = 1;
for await (const deletePath of fileSystemClient.listDeletedPaths()) {
console.log(`Path ${i++}: ${deletePath.name}`);
}
Example using iter.next()
:
let i = 1;
let iter = fileSystemClient.listDeletedPaths();
let deletedPathItem = await iter.next();
while (!deletedPathItem.done) {
console.log(`Path ${i++}: ${deletedPathItem.value.name}`);
pathItem = await iter.next();
}
Example using byPage()
:
// passing optional maxPageSize in the page settings
let i = 1;
for await (const response of fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 20 })) {
for (const deletePath of response.pathItems) {
console.log(`Path ${i++}: ${deletePath.name}`);
}
}
Example using paging with a marker:
let i = 1;
let iterator = fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 2 });
let response = (await iterator.next()).value;
// Prints 2 path names
for (const path of response.pathItems) {
console.log(`Path ${i++}: ${path.name}}`);
}
// Gets next marker
let marker = response.continuationToken;
// Passing next marker as continuationToken
iterator = fileSystemClient.listDeletedPaths().byPage({ continuationToken: marker, maxPageSize: 10 });
response = (await iterator.next()).value;
// Prints 10 path names
for (const deletePath of response.deletedPathItems) {
console.log(`Path ${i++}: ${deletePath.name}`);
}
Optional. Options when listing deleted paths.
Returns an async iterable iterator to list all the paths (directories and files) under the specified file system.
.byPage() returns an async iterable iterator to list the paths in pages.
Example using for await
syntax:
// Get the fileSystemClient before you run these snippets,
// Can be obtained from `serviceClient.getFileSystemClient("<your-filesystem-name>");`
let i = 1;
for await (const path of fileSystemClient.listPaths()) {
console.log(`Path ${i++}: ${path.name}, isDirectory?: ${path.isDirectory}`);
}
Example using iter.next()
:
let i = 1;
let iter = fileSystemClient.listPaths();
let pathItem = await iter.next();
while (!pathItem.done) {
console.log(`Path ${i++}: ${pathItem.value.name}, isDirectory?: ${pathItem.value.isDirectory}`);
pathItem = await iter.next();
}
Example using byPage()
:
// passing optional maxPageSize in the page settings
let i = 1;
for await (const response of fileSystemClient.listPaths().byPage({ maxPageSize: 20 })) {
for (const path of response.pathItems) {
console.log(`Path ${i++}: ${path.name}, isDirectory?: ${path.isDirectory}`);
}
}
Example using paging with a marker:
let i = 1;
let iterator = fileSystemClient.listPaths().byPage({ maxPageSize: 2 });
let response = (await iterator.next()).value;
// Prints 2 path names
for (const path of response.pathItems) {
console.log(`Path ${i++}: ${path.name}, isDirectory?: ${path.isDirectory}`);
}
// Gets next marker
let marker = response.continuationToken;
// Passing next marker as continuationToken
iterator = fileSystemClient.listPaths().byPage({ continuationToken: marker, maxPageSize: 10 });
response = (await iterator.next()).value;
// Prints 10 path names
for (const path of response.pathItems) {
console.log(`Path ${i++}: ${path.name}, isDirectory?: ${path.isDirectory}`);
}
Optional. Options when listing paths.
Sets the permissions for the specified file system. The permissions indicate whether directories or files in a file system may be accessed publicly.
When you set permissions for a file system, the existing permissions are replaced. If no access or containerAcl provided, the existing file system ACL will be removed.
Optional. The level of public access to data in the file system.
Optional. Array of elements each having a unique Id and details of the access policy.
Optional. Options when setting file system access policy.
Sets one or more user-defined name-value pairs for the specified file system.
If no option provided, or no metadata defined in the parameter, the file system metadata will be removed.
Replace existing metadata with this value. If no value provided the existing metadata will be removed.
Optional. Options when setting file system metadata.
Restores a soft deleted path.
Required. The path of the deleted path.
Required. The deletion ID associated with the soft deleted path.
Generated using TypeDoc
A DataLakeFileSystemClient represents a URL to the Azure Storage file system allowing you to manipulate its directories and files.