azure-storage-file\src\File\FileRestProxy.php
You may obtain a copy of the License at https://github.com/azure/azure-storage-php/LICENSE
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
PHP version 5
- Author
- Azure Storage PHP SDK
- Category
- Microsoft
- Copyright
- 2017 Microsoft Corporation
- License
- https://github.com/azure/azure-storage-php/LICENSE
- Link
- https://github.com/azure/azure-storage-php
- Package
- MicrosoftAzure\Storage\File
\MicrosoftAzure\Storage\File\FileRestProxy
- Implements
- Parent(s)
- \MicrosoftAzure\Storage\Common\Internal\ServiceRestProxy
- Author
- Azure Storage PHP SDK
- Category
- Microsoft
- Copyright
- 2017 Microsoft Corporation
- Inherited_from
- \MicrosoftAzure\Storage\Common\Internal\ServiceRestProxy
- License
- https://github.com/azure/azure-storage-php/LICENSE
- Link
- https://github.com/azure/azure-storage-php
Properties
Methods

__construct(\MicrosoftAzure\Storage\Common\Internal\Serialization\ISerializer $dataSerializer = null) : voidInitializes new RestProxy object.
Inherited from:| Name | Type | Description |
|---|---|---|
| $dataSerializer | \MicrosoftAzure\Storage\Common\Internal\Serialization\ISerializer | The data serializer. |

abortCopy(string $share, string $path, string $copyID, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidAbort a file copy operation

abortCopyAsync(string $share, string $path, string $copyID, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidCreates promise to abort a file copy operation

addMetadataHeaders(array $headers, array $metadata = null) : arrayAdds metadata elements to headers array
Inherited from:| Name | Type | Description |
|---|---|---|
| $headers | array | HTTP request headers |
| $metadata | array | user specified metadata |
| Type | Description |
|---|---|
| array |

addOptionalHeader(array $headers, string $key, string $value) : voidAdds optional header.
Inherited from:Doesn't add the value if it satisfies empty().
| Name | Type | Description |
|---|---|---|
| $headers | array | &$headers The HTTP header parameters. |
| $key | string | The HTTP header name. |
| $value | string | The HTTP header value. |

addOptionalQueryParam(array $queryParameters, string $key, string $value) : voidAdds optional query parameter.
Inherited from:Doesn't add the value if it satisfies empty().
| Name | Type | Description |
|---|---|---|
| $queryParameters | array | &$queryParameters The query parameters. |
| $key | string | The query variable name. |
| $value | string | The query variable value. |

addPostParameter(array $postParameters, string $key, string $value) : arrayAdds HTTP POST parameter to the specified
Inherited from:| Name | Type | Description |
|---|---|---|
| $postParameters | array | An array of HTTP POST parameters. |
| $key | string | The key of a HTTP POST parameter. |
| $value | string | the value of a HTTP POST parameter. |
| Type | Description |
|---|---|
| array |

clearFileRange(string $share, string $path, \MicrosoftAzure\Storage\Common\Models\Range $range, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidClears range of bytes of a file. If the specified range is not 512-byte aligned, the operation will write zeros to the start or end of the range that is not 512-byte aligned and free the rest of the range inside that is 512-byte aligned.

clearFileRangeAsync(string $share, string $path, \MicrosoftAzure\Storage\Common\Models\Range $range, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to clear range of bytes of a file. If the specified range is not 512-byte aligned, the operation will write zeros to the start or end of the range that is not 512-byte aligned and free the rest of the range inside that is 512-byte aligned.
| Name | Type | Description |
|---|---|---|
| $share | string | The share name. |
| $path | string | The path of the file. |
| $range | \MicrosoftAzure\Storage\Common\Models\Range | The range in the file to be cleared. |
| $options | \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null | The optional parameters. |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

copyFile(string $share, string $path, string $sourcePath, array $metadata = array(), \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\CopyFileResultInforms server to copy file from $sourcePath to $path.
To copy a file to another file within the same storage account, you may use Shared Key to authenticate the source file. If you are copying a file from another storage account, or if you are copying a blob from the same storage account or another storage account, then you must authenticate the source file or blob using a shared access signature. If the source is a public blob, no authentication is required to perform the copy operation. Here are some examples of source object URLs: https://myaccount.file.core.windows.net/myshare/mydirectorypath/myfile https://myaccount.blob.core.windows.net/mycontainer/myblob?sastoken
| Name | Type | Description |
|---|---|---|
| $share | string | The share name. |
| $path | string | The path of the file. |
| $sourcePath | string | The path of the source. |
| $metadata | array | The metadata of the file. If specified, source metadata will not be copied. |
| $options | \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null | The optional parameters. |
| Type | Description |
|---|---|
| \MicrosoftAzure\Storage\File\Models\CopyFileResult |

copyFileAsync(string $share, string $path, string $sourcePath, array $metadata = array(), \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to inform server to copy file from $sourcePath to $path.
To copy a file to another file within the same storage account, you may use Shared Key to authenticate the source file. If you are copying a file from another storage account, or if you are copying a blob from the same storage account or another storage account, then you must authenticate the source file or blob using a shared access signature. If the source is a public blob, no authentication is required to perform the copy operation. Here are some examples of source object URLs: https://myaccount.file.core.windows.net/myshare/mydirectorypath/myfile https://myaccount.blob.core.windows.net/mycontainer/myblob?sastoken
| Name | Type | Description |
|---|---|---|
| $share | string | The share name. |
| $path | string | The path of the file. |
| $sourcePath | string | The path of the source. |
| $metadata | array | The metadata of the file. If specified, source metadata will not be copied. |
| $options | \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null | The optional parameters. |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

createDirectory(string $share, string $path, \MicrosoftAzure\Storage\File\Models\CreateDirectoryOptions | null $options = null) : voidCreates a new directory in the given share and path.

createDirectoryAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\CreateDirectoryOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates a promise to create a new directory in the given share and path.

createFile(string $share, string $path, integer $size, \MicrosoftAzure\Storage\File\Models\CreateFileOptions | null $options = null) : voidCreate a new file.

createFileAsync(string $share, string $path, integer $size, \MicrosoftAzure\Storage\File\Models\CreateFileOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to create a new file.

createFileFromContent(string $share, string $path, \Psr\Http\Message\StreamInterface | resource | string $content, \MicrosoftAzure\Storage\File\Models\CreateFileFromContentOptions | null $options = null) : voidCreates a file from a provided content.
| Name | Type | Description |
|---|---|---|
| $share | string | the share name |
| $path | string | the path of the file |
| $content | \Psr\Http\Message\StreamInterface | resource | string | the content used to create the file |
| $options | \MicrosoftAzure\Storage\File\Models\CreateFileFromContentOptions | null | optional parameters |

createFileFromContentAsync(string $share, string $path, \Psr\Http\Message\StreamInterface | resource | string $content, \MicrosoftAzure\Storage\File\Models\CreateFileFromContentOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates a promise to create a file from a provided content.
| Name | Type | Description |
|---|---|---|
| $share | string | the share name |
| $path | string | the path of the file |
| $content | \Psr\Http\Message\StreamInterface | resource | string | the content used to create the file |
| $options | \MicrosoftAzure\Storage\File\Models\CreateFileFromContentOptions | null | optional parameters |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

createFileService(string $connectionString, array $options = array()) : \MicrosoftAzure\Storage\File\FileRestProxyBuilds a file service object, it accepts the following options:
- http: (array) the underlying guzzle options. refer to http://docs.guzzlephp.org/en/latest/request-options.html for detailed available options
- middlewares: (mixed) the middleware should be either an instance of a sub-class that
implements \MicrosoftAzure\Storage\File\MicrosoftAzure\Storage\Common\Middlewares\IMiddleware, or a
callablethat follows the Guzzle middleware implementation convention
Please refer to https://azure.microsoft.com/en-us/documentation/articles/storage-configure-connection-string for how to construct a connection string with storage account name/key, or with a shared access signature (SAS Token).
| Name | Type | Description |
|---|---|---|
| $connectionString | string | The configuration connection string. |
| $options | array | Array of options to pass to the service |
| Type | Description |
|---|---|
| \MicrosoftAzure\Storage\File\FileRestProxy |

createMiddlewareStack(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions) : \MicrosoftAzure\Storage\Common\Middlewares\MiddlewareStackCreate a middleware stack with given middleware.
Inherited from:| Name | Type | Description |
|---|---|---|
| $serviceOptions | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The options user passed in. |
| Type | Description |
|---|---|
| \MicrosoftAzure\Storage\Common\Middlewares\MiddlewareStack |

createRequest(string $method, array $headers, array $queryParams, array $postParameters, string $path, $locationMode, string $body = \MicrosoftAzure\Storage\Common\Internal\Resources::EMPTY_STRING) : \GuzzleHttp\Psr7\RequestCreate the request to be sent.
Inherited from:| Name | Type | Description |
|---|---|---|
| $method | string | The method of the HTTP request |
| $headers | array | The header field of the request |
| $queryParams | array | The query parameter of the request |
| $postParameters | array | The HTTP POST parameters |
| $path | string | URL path |
| $locationMode | ||
| $body | string | Request body |
| Type | Description |
|---|---|
| \GuzzleHttp\Psr7\Request |

createShare(string $share, \MicrosoftAzure\Storage\File\Models\CreateShareOptions | null $options = null) : voidCreates a new share in the given storage account.

createShareAsync(string $share, \MicrosoftAzure\Storage\File\Models\CreateShareOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to create a new share in the given storage account.

deleteDirectory(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidDeletes a directory in the given share and path.

deleteDirectoryAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates a promise to delete a new directory in the given share and path.

deleteFile(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidDeletes a file in the given share and path.

deleteFileAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates a promise to delete a new file in the given share and path.

deleteShare(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidDeletes a share in the given storage account.

deleteShareAsync(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreate a promise for deleting a share.

generateMetadataHeaders(array $metadata = null) : arrayGenerates metadata headers by prefixing each element with 'x-ms-meta'.
Inherited from:| Name | Type | Description |
|---|---|---|
| $metadata | array | user defined metadata. |
| Type | Description |
|---|---|
| array |

generateRequestOptions(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions, callable $handler) : arrayGenerate the request options using the given service options and stored information.
Inherited from:| Name | Type | Description |
|---|---|---|
| $serviceOptions | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The service options used to generate request options. |
| $handler | callable | The handler used to send the request. |
| Type | Description |
|---|---|
| array |

getAccountName() : stringGets the account name.
Inherited from:| Type | Description |
|---|---|
| string |

getDirectoryMetadata(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\GetDirectoryMetadataResultGets a directory's metadata from the given share and path.

getDirectoryMetadataAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to get a directory's metadata from the given share and path.

getDirectoryProperties(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\GetDirectoryPropertiesResultGets a directory's properties from the given share and path.

getDirectoryPropertiesAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to get a directory's properties from the given share and path.

getFile(string $share, string $path, \MicrosoftAzure\Storage\File\Models\GetFileOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\GetFileResultReads or downloads a file from the server, including its metadata and properties.

getFileAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\GetFileOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to read or download a file from the server, including its metadata and properties.

getFileMetadata(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\GetFileMetadataResultGets a file's metadata from the given share and path.

getFileMetadataAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to get a file's metadata from the given share and path.

getFileProperties(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\FilePropertiesGets a file's properties from the given share and path.

getFilePropertiesAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to get a file's properties from the given share and path.

getMiddlewares() : arrayGets middlewares that will be handling the request and response.
Inherited from:| Type | Description |
|---|---|
| array |

getPsrPrimaryUri() : \GuzzleHttp\Psr7\UriGet the primary URI in PSR form.
Inherited from:| Type | Description |
|---|---|
| \GuzzleHttp\Psr7\Uri |

getPsrSecondaryUri() : \GuzzleHttp\Psr7\UriGet the secondary URI in PSR form.
Inherited from:| Type | Description |
|---|---|
| \GuzzleHttp\Psr7\Uri |

getServiceProperties(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \MicrosoftAzure\Storage\Common\Models\GetServicePropertiesResultGets the properties of the service.
Inherited from:
getServicePropertiesAsync(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to get the properties of the service.
Inherited from:
getServiceStats(\MicrosoftAzure\Storage\Common\Models\ServiceOptions | null $options = null) : \MicrosoftAzure\Storage\Common\Models\GetServiceStatsResultRetrieves statistics related to replication for the service. The operation will only be sent to secondary location endpoint.
Inherited from:| Name | Type | Description |
|---|---|---|
| $options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | null | The options this operation sends with. |
| Type | Description |
|---|---|
| \MicrosoftAzure\Storage\Common\Models\GetServiceStatsResult |

getServiceStatsAsync(\MicrosoftAzure\Storage\Common\Models\ServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise that retrieves statistics related to replication for the service. The operation will only be sent to secondary location endpoint.
Inherited from:| Name | Type | Description |
|---|---|---|
| $options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | null | The options this operation sends with. |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

getShareAcl(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\GetShareACLResultGets the access control list (ACL) for the share.

getShareAclAsync(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates the promise to get the access control list (ACL) for the share.

getShareMetadata(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\GetSharePropertiesResultReturns only user-defined metadata for the specified share.

getShareMetadataAsync(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreate promise to return only user-defined metadata for the specified share.

getShareProperties(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\GetSharePropertiesResultReturns all properties and metadata on the share.

getSharePropertiesAsync(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreate promise to return all properties and metadata on the share.

getShareStats(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\GetShareStatsResultGet the statistics related to the share.

getShareStatsAsync(string $share, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceGet the statistics related to the share.

groupQueryValues(array $values) : stringGroups set of values into one value separated with Resources::SEPARATOR
Inherited from:| Name | Type | Description |
|---|---|---|
| $values | array | array of values to be grouped. |
| Type | Description |
|---|---|
| string |

listDirectoriesAndFiles(string $share, string $path = '', \MicrosoftAzure\Storage\File\Models\ListDirectoriesAndFilesOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\ListDirectoriesAndFilesResultList directories and files under specified path.
| Name | Type | Description |
|---|---|---|
| $share | string | The share that contains all the files and directories. |
| $path | string | The path to be listed. |
| $options | \MicrosoftAzure\Storage\File\Models\ListDirectoriesAndFilesOptions | null | Optional parameters. |
| Type | Description |
|---|---|
| \MicrosoftAzure\Storage\File\Models\ListDirectoriesAndFilesResult |

listDirectoriesAndFilesAsync(string $share, string $path = '', \MicrosoftAzure\Storage\File\Models\ListDirectoriesAndFilesOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to list directories and files under specified path.

listFileRange(string $share, string $path, \MicrosoftAzure\Storage\Common\Models\Range $range = null, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\ListFileRangesResultLists range of bytes of a file.
| Name | Type | Description |
|---|---|---|
| $share | string | The share name. |
| $path | string | The path of the file. |
| $range | \MicrosoftAzure\Storage\Common\Models\Range | The range in the file to be listed. |
| $options | \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null | The optional parameters. |
| Type | Description |
|---|---|
| \MicrosoftAzure\Storage\File\Models\ListFileRangesResult |

listFileRangeAsync(string $share, string $path, \MicrosoftAzure\Storage\Common\Models\Range $range = null, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to list range of bytes of a file.
| Name | Type | Description |
|---|---|---|
| $share | string | The share name. |
| $path | string | The path of the file. |
| $range | \MicrosoftAzure\Storage\Common\Models\Range | The range in the file to be listed. |
| $options | \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null | The optional parameters. |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

listShares(\MicrosoftAzure\Storage\File\Models\ListSharesOptions | null $options = null) : \MicrosoftAzure\Storage\File\Models\ListSharesResultReturns a list of the shares under the specified account

listSharesAsync(\MicrosoftAzure\Storage\File\Models\ListSharesOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreate a promise to return a list of the shares under the specified account

onRejected(string | \Exception $reason, array | integer $expected) : \Psr\Http\Message\ResponseInterface| Name | Type | Description |
|---|---|---|
| $reason | string | \Exception | Rejection reason. |
| $expected | array | integer | Expected Status Codes. |
| Type | Description |
|---|---|
| \Psr\Http\Message\ResponseInterface |

pushMiddleware(callable | \MicrosoftAzure\Storage\Common\Internal\IMiddleware $middleware) : voidPush a new middleware into the middlewares array. The newly added middleware will be the most inner middleware when executed.
Inherited from:| Name | Type | Description |
|---|---|---|
| $middleware | callable | \MicrosoftAzure\Storage\Common\Internal\IMiddleware | the middleware to be added. |

putFileRange(string $share, string $path, string | resource | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Common\Models\Range $range, \MicrosoftAzure\Storage\File\Models\PutFileRangeOptions | null $options = null) : voidWrites range of bytes to a file. Range can be at most 4MB in length.
| Name | Type | Description |
|---|---|---|
| $share | string | The share name. |
| $path | string | The path of the file. |
| $content | string | resource | \Psr\Http\Message\StreamInterface | The content to be uploaded. |
| $range | \MicrosoftAzure\Storage\Common\Models\Range | The range in the file to be put. |
| $options | \MicrosoftAzure\Storage\File\Models\PutFileRangeOptions | null | The optional parameters. |

putFileRangeAsync(string $share, string $path, string | resource | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Common\Models\Range $range, \MicrosoftAzure\Storage\File\Models\PutFileRangeOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to write range of bytes to a file. Range can be at most 4MB in length.
| Name | Type | Description |
|---|---|---|
| $share | string | The share name. |
| $path | string | The path of the file. |
| $content | string | resource | \Psr\Http\Message\StreamInterface | The content to be uploaded. |
| $range | \MicrosoftAzure\Storage\Common\Models\Range | The range in the file to be put. |
| $options | \MicrosoftAzure\Storage\File\Models\PutFileRangeOptions | null | The optional parameters. |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

sendAsync(string $method, array $headers, array $queryParams, array $postParameters, string $path, array | integer $expected = \MicrosoftAzure\Storage\Common\Internal\Resources::STATUS_OK, string $body = \MicrosoftAzure\Storage\Common\Internal\Resources::EMPTY_STRING, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions = null) : \GuzzleHttp\Promise\PromiseInterfaceCreate promise of sending HTTP request with the specified parameters.
Inherited from:| Name | Type | Description |
|---|---|---|
| $method | string | HTTP method used in the request |
| $headers | array | HTTP headers. |
| $queryParams | array | URL query parameters. |
| $postParameters | array | The HTTP POST parameters. |
| $path | string | URL path |
| $expected | array | integer | Expected Status Codes. |
| $body | string | Request body |
| $serviceOptions | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | Service options |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

sendConcurrentAsync(callable $generator, integer $statusCode, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options) : \GuzzleHttp\Promise\Promise | \GuzzleHttp\Promise\PromiseInterfaceSend the requests concurrently. Number of concurrency can be modified by inserting a new key/value pair with the key 'number_of_concurrency' into the $requestOptions of $serviceOptions. Return only the promise.
Inherited from:| Name | Type | Description |
|---|---|---|
| $generator | callable | the generator function to generate request upon fulfillment |
| $statusCode | integer | The expected status code for each of the request generated by generator. |
| $options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The service options for the concurrent requests. |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\Promise | \GuzzleHttp\Promise\PromiseInterface |

sendContext(\MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext $context) : \GuzzleHttp\Psr7\ResponseSends the context.
Inherited from:| Name | Type | Description |
|---|---|---|
| $context | \MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext | The context of the request. |
| Type | Description |
|---|---|
| \GuzzleHttp\Psr7\Response |

sendContextAsync(\MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext $context) : \GuzzleHttp\Promise\PromiseInterfaceCreates the promise to send the context.
Inherited from:| Name | Type | Description |
|---|---|---|
| $context | \MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext | The context of the request. |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

setDirectoryMetadata(string $share, string $path, array $metadata, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidSets a directory's metadata from the given share and path.

setDirectoryMetadataAsync(string $share, string $path, array $metadata, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to set a directory's metadata from the given share and path.

setFileMetadata(string $share, string $path, array $metadata, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidSets a file's metadata from the given share and path.

setFileMetadataAsync(string $share, string $path, array $metadata, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to set a file's metadata from the given share and path.

setFileProperties(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileProperties $properties, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidSets properties on the file.

setFilePropertiesAsync(string $share, string $path, \MicrosoftAzure\Storage\File\Models\FileProperties $properties, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to set properties on the file.
| Name | Type | Description |
|---|---|---|
| $share | string | share name |
| $path | string | path of the file |
| $properties | \MicrosoftAzure\Storage\File\Models\FileProperties | file properties. |
| $options | \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null | optional parameters |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

setServiceProperties(\MicrosoftAzure\Storage\Common\Models\ServiceProperties $serviceProperties, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : voidSets the properties of the service.
Inherited from:It's recommended to use getServiceProperties, alter the returned object and then use setServiceProperties with this altered object.
| Name | Type | Description |
|---|---|---|
| $serviceProperties | \MicrosoftAzure\Storage\Common\Models\ServiceProperties | The service properties. |
| $options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The optional parameters. |

setServicePropertiesAsync(\MicrosoftAzure\Storage\Common\Models\ServiceProperties $serviceProperties, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates the promise to set the properties of the service.
Inherited from:It's recommended to use getServiceProperties, alter the returned object and then use setServiceProperties with this altered object.
| Name | Type | Description |
|---|---|---|
| $serviceProperties | \MicrosoftAzure\Storage\Common\Models\ServiceProperties | The service properties. |
| $options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The optional parameters. |
| Type | Description |
|---|---|
| \GuzzleHttp\Promise\PromiseInterface |

setShareAcl(string $share, \MicrosoftAzure\Storage\File\Models\ShareACL $acl, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidSets the ACL and any share-level access policies for the share.

setShareAclAsync(string $share, \MicrosoftAzure\Storage\File\Models\ShareACL $acl, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to set the ACL and any share-level access policies for the share.

setShareMetadata(string $share, array $metadata, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidUpdates metadata of the share.

setShareMetadataAsync(string $share, array $metadata, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to update metadata headers on the share.

setShareProperties(string $share, integer $quota, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : voidSets quota of the share.

setSharePropertiesAsync(string $share, integer $quota, \MicrosoftAzure\Storage\File\Models\FileServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterfaceCreates promise to set quota the share.

throwIfError(\Psr\Http\Message\ResponseInterface $response, array | integer $expected) : voidThrows ServiceException if the received status code is not expected.
Inherited from:| Name | Type | Description |
|---|---|---|
| $response | \Psr\Http\Message\ResponseInterface | The response received |
| $expected | array | integer | The expected status codes. |
| Exception | Description |
|---|---|
| \MicrosoftAzure\Storage\Common\Exceptions\ServiceException |