Delen via


DataLakeDirectoryClient.GetPathsAsync Method

Definition

The GetPaths(Boolean, Boolean, CancellationToken) operation returns an async sequence of paths in this directory. Enumerating the paths may make multiple requests to the service while fetching all the values.

For more information, see List Path(s).

public virtual Azure.AsyncPageable<Azure.Storage.Files.DataLake.Models.PathItem> GetPathsAsync (bool recursive = false, bool userPrincipalName = false, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPathsAsync : bool * bool * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Storage.Files.DataLake.Models.PathItem>
override this.GetPathsAsync : bool * bool * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Storage.Files.DataLake.Models.PathItem>
Public Overridable Function GetPathsAsync (Optional recursive As Boolean = false, Optional userPrincipalName As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PathItem)

Parameters

recursive
Boolean

If "true", all paths are listed; otherwise, only paths at the root of the filesystem are listed.

userPrincipalName
Boolean

Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true", the user identity values returned in the owner and group fields of each list entry will be transformed from Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not translated because they do not have unique friendly names.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

An Pageable<T> describing the paths in the directory.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to