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

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

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

        $this->addOptionalHeader(
            $headers,
            Resources::X_MS_RANGE,
            $range->getRangeString()
        );

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

        $this->addOptionalHeader(
            $headers,
            Resources::X_MS_WRITE,
            'Clear'
        );

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

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_CREATED,
            Resources::EMPTY_STRING,
            $options
        );
    }
public function clearFileRangeAsync(
        $share,
        $path,
        Range $range,
        FileServiceOptions $options = null
    ) {
        Validate::canCastAsString($share, 'share');
        Validate::canCastAsString($path, 'path');
        Validate::notNullOrEmpty($path, 'path');
        Validate::notNullOrEmpty($share, 'share');

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

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

        $this->addOptionalHeader(
            $headers,
            Resources::X_MS_RANGE,
            $range->getRangeString()
        );

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

        $this->addOptionalHeader(
            $headers,
            Resources::X_MS_WRITE,
            'Clear'
        );

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

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_CREATED,
            Resources::EMPTY_STRING,
            $options
        );
    }
Creates 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.

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

@return \GuzzleHttp\Promise\PromiseInterface

@see https://docs.microsoft.com/en-us/rest/api/storageservices/put-range