<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.25.0" />

Azure.Storage.Files.DataLake.DataLakePathClient

public class DataLakePathClient
A PathClient represents a URI to the Azure DataLake service allowing you to manipulate a file or directory.
public virtual string AccountName { get; }

Gets the Storage account name corresponding to the directory client.

public virtual bool CanGenerateSasUri { get; }

Indicates whether the client is able to generate a SAS uri. Client can generate a SAS url if it is authenticated with a StorageSharedKeyCredential.

public virtual string FileSystemName { get; }

Gets the file system name name corresponding to the directory client.

public virtual string Name { get; }

Gets the name of the file or directory.

public virtual string Path { get; }

Gets the path corresponding to the path client.

public virtual Uri Uri { get; }

Gets the directory's primary Uri endpoint.

protected DataLakePathClient()

Initializes a new instance of the DataLakePathClient class for mocking.

public DataLakePathClient(Uri pathUri)

Initializes a new instance of the DataLakePathClient class.

public DataLakePathClient(Uri pathUri, DataLakeClientOptions options)

Initializes a new instance of the DataLakePathClient class.

public DataLakePathClient(string connectionString, string fileSystemName, string path)

Initializes a new instance of the DataLakePathClient.

public DataLakePathClient(string connectionString, string fileSystemName, string path, DataLakeClientOptions options)

Initializes a new instance of the DataLakePathClient.

public DataLakePathClient(Uri pathUri, StorageSharedKeyCredential credential)

Initializes a new instance of the DataLakePathClient class.

public DataLakePathClient(Uri pathUri, StorageSharedKeyCredential credential, DataLakeClientOptions options)

Initializes a new instance of the DataLakePathClient class.

public DataLakePathClient(Uri pathUri, AzureSasCredential credential)

Initializes a new instance of the DataLakePathClient class.

public DataLakePathClient(Uri pathUri, AzureSasCredential credential, DataLakeClientOptions options)

Initializes a new instance of the DataLakePathClient class.

public DataLakePathClient(Uri pathUri, TokenCredential credential)

Initializes a new instance of the DataLakePathClient class.

public DataLakePathClient(Uri pathUri, TokenCredential credential, DataLakeClientOptions options)

Initializes a new instance of the DataLakePathClient class.

public DataLakePathClient(DataLakeFileSystemClient fileSystemClient, string path)

Initializes a new instance of the DataLakePathClient.

public virtual Response<PathInfo> Create(PathResourceType resourceType, DataLakePathCreateOptions options = null, CancellationToken cancellationToken = default)

The Create operation creates a file or directory. If the path already exists, it will be overwritten. If you don't intent to overwrite an existing path, consider using the CreateIfNotExists API. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Response<PathInfo> Create(PathResourceType resourceType, PathHttpHeaders httpHeaders, IDictionary<string, string> metadata, string permissions, string umask, DataLakeRequestConditions conditions, CancellationToken cancellationToken)

The Create operation creates a file or directory. If the path already exists, it will be overwritten. If you don't intent to overwrite an existing path, consider using the CreateIfNotExists API. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Task<Response<PathInfo>> CreateAsync(PathResourceType resourceType, DataLakePathCreateOptions options = null, CancellationToken cancellationToken = default)

The CreateAsync operation creates a file or directory. If the path already exists, it will be overwritten. If you don't intent to overwrite an existing path, consider using the CreateIfNotExistsAsync API. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Task<Response<PathInfo>> CreateAsync(PathResourceType resourceType, PathHttpHeaders httpHeaders, IDictionary<string, string> metadata, string permissions, string umask, DataLakeRequestConditions conditions, CancellationToken cancellationToken)

The CreateAsync operation creates a file or directory. If the path already exists, it will be overwritten. If you don't intent to overwrite an existing path, consider using the CreateIfNotExistsAsync API. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Response<PathInfo> CreateIfNotExists(PathResourceType resourceType, DataLakePathCreateOptions options = null, CancellationToken cancellationToken = default)

The CreateIfNotExists operation creates a file or directory. If the file or directory already exists, it is not changed. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Response<PathInfo> CreateIfNotExists(PathResourceType resourceType, PathHttpHeaders httpHeaders, IDictionary<string, string> metadata, string permissions, string umask, CancellationToken cancellationToken)

The CreateIfNotExists operation creates a file or directory. If the file or directory already exists, it is not changed. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Task<Response<PathInfo>> CreateIfNotExistsAsync(PathResourceType resourceType, DataLakePathCreateOptions options = null, CancellationToken cancellationToken = default)

The CreateIfNotExistsAsync operation creates a file or directory. If the file or directory already exists, it is not changed. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Task<Response<PathInfo>> CreateIfNotExistsAsync(PathResourceType resourceType, PathHttpHeaders httpHeaders, IDictionary<string, string> metadata, string permissions, string umask, CancellationToken cancellationToken)

The CreateIfNotExistsAsync operation creates a file or directory. If the file or directory already exists, it is not changed. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Response Delete(bool? recursive = default, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The Delete operation marks the specified path deletion. For more information, see Delete Path.

public virtual Task<Response> DeleteAsync(bool? recursive = default, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The DeleteAsync operation marks the specified path deletion. For more information, see Delete Path.

public virtual Response<bool> DeleteIfExists(bool? recursive = default, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The DeleteIfExists operation marks the specified path for deletion, if the path exists. For more information, see Delete Path.

public virtual Task<Response<bool>> DeleteIfExistsAsync(bool? recursive = default, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The DeleteIfExistsAsync operation marks the specified path deletion, if the path exists. For more information, see Delete Path.

public virtual Response<bool> Exists(CancellationToken cancellationToken = default)

The Exists operation can be called on a DataLakePathClient to see if the associated file or director exists in the file system.

public virtual Task<Response<bool>> ExistsAsync(CancellationToken cancellationToken = default)

The ExistsAsync operation can be called on a DataLakePathClient to see if the associated file or directory exists in the file system.

public virtual Uri GenerateSasUri(DataLakeSasPermissions permissions, DateTimeOffset expiresOn)

The GenerateSasUri returns a Uri that generates a DataLake Path Service Shared Access Signature (SAS) Uri based on the Client properties and parameters passed. The SAS is signed by the shared key credential of the client. To check if the client is able to sign a Service Sas see CanGenerateSasUri. For more information, see Constructing a service SAS.

public virtual Uri GenerateSasUri(DataLakeSasPermissions permissions, DateTimeOffset expiresOn, out string stringToSign)

The GenerateSasUri returns a Uri that generates a DataLake Path Service Shared Access Signature (SAS) Uri based on the Client properties and parameters passed. The SAS is signed by the shared key credential of the client. To check if the client is able to sign a Service Sas see CanGenerateSasUri. For more information, see Constructing a service SAS.

public virtual Uri GenerateSasUri(DataLakeSasBuilder builder)

The GenerateSasUri returns a Uri that generates a DataLake File Service Shared Access Signature (SAS) Uri based on the Client properties and and builder. The SAS is signed by the shared key credential of the client. To check if the client is able to sign a Service Sas see CanGenerateSasUri. For more information, see Constructing a Service SAS.

public virtual Uri GenerateSasUri(DataLakeSasBuilder builder, out string stringToSign)

The GenerateSasUri returns a Uri that generates a DataLake File Service Shared Access Signature (SAS) Uri based on the Client properties and and builder. The SAS is signed by the shared key credential of the client. To check if the client is able to sign a Service Sas see CanGenerateSasUri. For more information, see Constructing a Service SAS.

public virtual Uri GenerateUserDelegationSasUri(DataLakeSasPermissions permissions, DateTimeOffset expiresOn, UserDelegationKey userDelegationKey)

The GenerateUserDelegationSasUri returns a Uri that generates a DataLake Path Service Shared Access Signature (SAS) Uri based on the Client properties and parameter passed. The SAS is signed by the user delegation key passed in. For more information, see Creating an user delegation SAS.

public virtual Uri GenerateUserDelegationSasUri(DataLakeSasPermissions permissions, DateTimeOffset expiresOn, UserDelegationKey userDelegationKey, out string stringToSign)

The GenerateUserDelegationSasUri returns a Uri that generates a DataLake Path Service Shared Access Signature (SAS) Uri based on the Client properties and parameter passed. The SAS is signed by the user delegation key passed in. For more information, see Creating an user delegation SAS.

public virtual Uri GenerateUserDelegationSasUri(DataLakeSasBuilder builder, UserDelegationKey userDelegationKey)

The GenerateUserDelegationSasUri returns a Uri that generates a DataLake Path Service Shared Access Signature (SAS) Uri based on the Client properties and builder passed. The SAS is signed by the user delegation key passed in. For more information, see Creating an user delegation SAS.

public virtual Uri GenerateUserDelegationSasUri(DataLakeSasBuilder builder, UserDelegationKey userDelegationKey, out string stringToSign)

The GenerateUserDelegationSasUri returns a Uri that generates a DataLake Path Service Shared Access Signature (SAS) Uri based on the Client properties and builder passed. The SAS is signed by the user delegation key passed in. For more information, see Creating an user delegation SAS.

public virtual Response<PathAccessControl> GetAccessControl(bool? userPrincipalName = default, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The GetAccessControl operation returns the access control data for a path. For more information, see Get Properties.

public virtual Task<Response<PathAccessControl>> GetAccessControlAsync(bool? userPrincipalName = default, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The GetAccessControlAsync operation returns the access control data for a path. For more information, see Get Properties.

public virtual Response<PathProperties> GetProperties(DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The GetProperties operation returns all user-defined metadata, standard HTTP properties, and system properties for the path. It does not return the content of the path. For more information, see Get Properties.

public virtual Task<Response<PathProperties>> GetPropertiesAsync(DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The GetPropertiesAsync operation returns all user-defined metadata, standard HTTP properties, and system properties for the path. It does not return the content of the path. For more information, see Get Properties.

public virtual Response<AccessControlChangeResult> RemoveAccessControlRecursive(IList<RemovePathAccessControlItem> accessControlList, string continuationToken = null, AccessControlChangeOptions options = null, CancellationToken cancellationToken = default)

The RemoveAccessControlRecursive operation removes the Access Control on a path and subpaths For more information, see Update Path.

public virtual Task<Response<AccessControlChangeResult>> RemoveAccessControlRecursiveAsync(IList<RemovePathAccessControlItem> accessControlList, string continuationToken = null, AccessControlChangeOptions options = null, CancellationToken cancellationToken = default)

The RemoveAccessControlRecursiveAsync operation removes the Access Control on a path and subpaths For more information, see Update Path.

public virtual Response<DataLakePathClient> Rename(string destinationPath, string destinationFileSystem = null, DataLakeRequestConditions sourceConditions = null, DataLakeRequestConditions destinationConditions = null, CancellationToken cancellationToken = default)

The Rename operation renames a file or directory. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Task<Response<DataLakePathClient>> RenameAsync(string destinationPath, string destinationFileSystem = null, DataLakeRequestConditions sourceConditions = null, DataLakeRequestConditions destinationConditions = null, CancellationToken cancellationToken = default)

The RenameAsync operation renames a file or directory. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual Response<PathInfo> SetAccessControlList(IList<PathAccessControlItem> accessControlList, string owner = null, string group = null, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The SetAccessControlList operation sets the Access Control on a path For more information, see Update Path.

public virtual Task<Response<PathInfo>> SetAccessControlListAsync(IList<PathAccessControlItem> accessControlList, string owner = null, string group = null, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The SetAccessControlListAsync operation sets the Access Control on a path For more information, see Update Path.

public virtual Response<AccessControlChangeResult> SetAccessControlRecursive(IList<PathAccessControlItem> accessControlList, string continuationToken = null, AccessControlChangeOptions options = null, CancellationToken cancellationToken = default)

The SetAccessControlRecursive operation sets the Access Control on a path and subpaths For more information, see Update Path.

public virtual Task<Response<AccessControlChangeResult>> SetAccessControlRecursiveAsync(IList<PathAccessControlItem> accessControlList, string continuationToken = null, AccessControlChangeOptions options = null, CancellationToken cancellationToken = default)

The SetAccessControlRecursiveAsync operation sets the Access Control on a path and subpaths For more information, see Update Path.

public virtual Response<PathInfo> SetHttpHeaders(PathHttpHeaders httpHeaders = null, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The SetHttpHeaders operation sets system properties on the path. For more information, see Set Properties.

public virtual Task<Response<PathInfo>> SetHttpHeadersAsync(PathHttpHeaders httpHeaders = null, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The SetHttpHeadersAsync operation sets system properties on the PATH. For more information, see Set Properties.

public virtual Response<PathInfo> SetMetadata(IDictionary<string, string> metadata, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The SetMetadata operation sets user-defined metadata for the specified path as one or more name-value pairs. For more information, see Set Metadata.

public virtual Task<Response<PathInfo>> SetMetadataAsync(IDictionary<string, string> metadata, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The SetMetadataAsync operation sets user-defined metadata for the specified path as one or more name-value pairs. For more information, see Set Metadata.

public virtual Response<PathInfo> SetPermissions(PathPermissions permissions, string owner = null, string group = null, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The SetPermissions operation sets the file permissions on a path. For more information, see Update Path.

public virtual Task<Response<PathInfo>> SetPermissionsAsync(PathPermissions permissions, string owner = null, string group = null, DataLakeRequestConditions conditions = null, CancellationToken cancellationToken = default)

The SetPermissionsAsync operation sets the file permissions on a path. For more information, see Update Path.

public virtual Response<AccessControlChangeResult> UpdateAccessControlRecursive(IList<PathAccessControlItem> accessControlList, string continuationToken = null, AccessControlChangeOptions options = null, CancellationToken cancellationToken = default)

The UpdateAccessControlRecursive operation modifies the Access Control on a path and subpaths For more information, see Update Path.

public virtual Task<Response<AccessControlChangeResult>> UpdateAccessControlRecursiveAsync(IList<PathAccessControlItem> accessControlList, string continuationToken = null, AccessControlChangeOptions options = null, CancellationToken cancellationToken = default)

The UpdateAccessControlRecursiveAsync operation modifies the Access Control on a path and subpaths For more information, see Update Path.

Initializes a new instance of the DataLakePathClient class with an identical Uri source but the specified customerProvidedKey.