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".
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.
StorageClient is a reference to protocol layer operations entry, which is generated by AutoRest generator.
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.
Delete current file system.
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.
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".
Get a DataLakeLeaseClient that manages leases on the file system.
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.
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}`);
}
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.
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.
Generated using TypeDoc
A DataLakeFileSystemClient represents a URL to the Azure Storage file system allowing you to manipulate its directories and files.