Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DataLakeFileSystemClient

Package version

A DataLakeFileSystemClient represents a URL to the Azure Storage file system allowing you to manipulate its directories and files.

export

Hierarchy

Index

Constructors

constructor

Properties

accountName

accountName: string

Protected blobEndpointUrl

blobEndpointUrl: string

Encoded URL string value for corresponding blob endpoint.

memberof

StorageClient

credential

credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential

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.

memberof

StorageClient

Protected dfsEndpointUrl

dfsEndpointUrl: string

Encoded URL string value for corresponding dfs endpoint.

memberof

StorageClient

Protected isHttps

isHttps: boolean
memberof

StorageClient

Protected storageClientContext

storageClientContext: StorageClientContext

StorageClient is a reference to protocol layer operations entry, which is generated by AutoRest generator.

memberof

StorageClient

Protected storageClientContextToBlobEndpoint

storageClientContextToBlobEndpoint: StorageClientContext

storageClientContextWithBlobEndpoint is a reference to protocol layer operations entry, which is generated by AutoRest generator, with its url pointing to the Blob endpoint.

memberof

StorageClient

url

url: string

Encoded URL string value.

memberof

StorageClient

Accessors

name

  • get name(): string

Methods

create

createIfNotExists

delete

deleteIfExists

exists

getAccessPolicy

getDataLakeLeaseClient

getDirectoryClient

getFileClient

getProperties

listPaths

  • 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}`);
    }
    see

    https://docs.microsoft.com/rest/api/storageservices/list-blobs

    memberof

    DataLakeFileSystemClient

    Parameters

    Returns PagedAsyncIterableIterator<Path, FileSystemListPathsResponse>

setAccessPolicy

setMetadata

Generated using TypeDoc