PHP OSS for Azure API Reference

ShareDirectoryClient
in package

Read onlyYes
FinalYes

Provides operations for an Azure file share directory.

Table of Contents

Properties

$credential  : StorageSharedKeyCredential|TokenCredential|null
$directoryPath  : string
$shareName  : string
$uri  : UriInterface
$options  : ShareDirectoryClientOptions

Methods

__construct()  : mixed
canGenerateSasUri()  : bool
Returns whether this client has a shared-key credential capable of signing a SAS for this directory path.
generateSasUri()  : UriInterface
Generates a URI for this directory containing a signed service SAS query string.
getDirectoryClient()  : self
Creates a client for a child directory without making a service request.
getFileClient()  : ShareFileClient
Creates a client for a file inside this directory without making a service request.

Properties

Methods

__construct()

public __construct(UriInterface $uri[, StorageSharedKeyCredential|TokenCredential|null $credential = null ][, ShareDirectoryClientOptions $options = new ShareDirectoryClientOptions() ]) : mixed
Parameters
$uri : UriInterface

URI of the directory, including any SAS query string.

$credential : StorageSharedKeyCredential|TokenCredential|null = null

Credential used to authorize requests, or null for anonymous/SAS access.

$options : ShareDirectoryClientOptions = new ShareDirectoryClientOptions()

Client transport and service-version options.

canGenerateSasUri()

Returns whether this client has a shared-key credential capable of signing a SAS for this directory path.

public canGenerateSasUri() : bool
Return values
bool

generateSasUri()

Generates a URI for this directory containing a signed service SAS query string.

public generateSasUri(ShareSasBuilder $shareSasBuilder) : UriInterface

Azure Files service SAS supports share (sr=s) and file (sr=f) resources. Directory paths are therefore signed using the file-path form, matching the Azure .NET SDK.

Parameters
$shareSasBuilder : ShareSasBuilder
Tags
throws
UnableToGenerateSasException

When the client does not have a shared-key credential.

Return values
UriInterface

getDirectoryClient()

Creates a client for a child directory without making a service request.

public getDirectoryClient(string $directoryPath) : self
Parameters
$directoryPath : string
Return values
self
On this page

Search results