azure-storage-file/src/File/FileRestProxy.php
public function listFileRangeAsync(
        $share,
        $path,
        Range $range = null,
        FileServiceOptions $options = null
    ) {
        Validate::canCastAsString($share, 'share');
        Validate::canCastAsString($path, 'path');
        Validate::notNullOrEmpty($path, 'path');
        Validate::notNullOrEmpty($share, 'share');

        $method      = Resources::HTTP_GET;
        $headers     = array();
        $queryParams = array();
        $postParams  = array();
        $path        = $this->createPath($share, $path);

        if (is_null($options)) {
            $options = new FileServiceOptions();
        }

        if ($range != null) {
            $this->addOptionalHeader(
                $headers,
                Resources::X_MS_RANGE,
                $range->getRangeString()
            );
        }

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_COMP,
            'rangelist'
        );

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_TIMEOUT,
            $options->getTimeout()
        );

        $dataSerializer = $this->dataSerializer;

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_OK,
            Resources::EMPTY_STRING,
            $options
        )->then(function ($response) use ($dataSerializer) {
            $responseHeaders = HttpFormatter::formatHeaders($response->getHeaders());
            $parsed = $dataSerializer->unserialize($response->getBody());
            return ListFileRangesResult::create($responseHeaders, $parsed);
        }, null);
    }
public function listFileRangeAsync(
        $share,
        $path,
        Range $range = null,
        FileServiceOptions $options = null
    ) {
        Validate::canCastAsString($share, 'share');
        Validate::canCastAsString($path, 'path');
        Validate::notNullOrEmpty($path, 'path');
        Validate::notNullOrEmpty($share, 'share');

        $method      = Resources::HTTP_GET;
        $headers     = array();
        $queryParams = array();
        $postParams  = array();
        $path        = $this->createPath($share, $path);

        if (is_null($options)) {
            $options = new FileServiceOptions();
        }

        if ($range != null) {
            $this->addOptionalHeader(
                $headers,
                Resources::X_MS_RANGE,
                $range->getRangeString()
            );
        }

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_COMP,
            'rangelist'
        );

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_TIMEOUT,
            $options->getTimeout()
        );

        $dataSerializer = $this->dataSerializer;

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_OK,
            Resources::EMPTY_STRING,
            $options
        )->then(function ($response) use ($dataSerializer) {
            $responseHeaders = HttpFormatter::formatHeaders($response->getHeaders());
            $parsed = $dataSerializer->unserialize($response->getBody());
            return ListFileRangesResult::create($responseHeaders, $parsed);
        }, null);
    }
Creates promise to list range of bytes of a file.

@param  string                  $share   The share name.
@param  string                  $path    The path of the file.
@param  Range                   $range   The range in the file to
be listed.
@param  FileServiceOptions|null $options The optional parameters.

@return \GuzzleHttp\Promise\PromiseInterface

@see https://docs.microsoft.com/en-us/rest/api/storageservices/list-ranges