Amazon_S3_And_CloudFront::does_file_exist_s3 PHP Method

does_file_exist_s3() public method

Does file exist s3
public does_file_exist_s3 ( string $filename, string $time ) : boolean
$filename string
$time string
return boolean
    function does_file_exist_s3($filename, $time)
    {
        $bucket = $this->get_setting('bucket');
        $region = $this->get_setting('region');
        if (is_wp_error($region)) {
            return false;
        }
        $s3client = $this->get_s3client($region);
        $prefix = ltrim(trailingslashit($this->get_object_prefix()), '/');
        $prefix .= ltrim(trailingslashit($this->get_dynamic_prefix($time)), '/');
        return $s3client->doesObjectExist($bucket, $prefix . $filename);
    }
Amazon_S3_And_CloudFront