BaiduBCS::get_object_info PHP Méthode

get_object_info() public méthode

获取文件信息,发送的为HTTP HEAD请求,文件信息都在http response的header中,不会提取文件的内容
public get_object_info ( string $bucket, string $object, array $opt = [] ) : array
$bucket string (Required)
$object string (Required)
$opt array (Optional)
Résultat array BCS_ResponseCore
    public function get_object_info($bucket, $object, $opt = array())
    {
        $this->assertParameterArray($opt);
        $opt[self::BUCKET] = $bucket;
        $opt[self::METHOD] = 'HEAD';
        $opt[self::OBJECT] = $object;
        $response = $this->authenticate($opt);
        //$this->log ( $response->isOK () ? "Get object info success!" : "Get object info failed! Response: [" . $response->body . "]", $opt );
        return $response;
    }