Pantheon\Terminus\Request\Request::download PHP Метод

download() публичный статический Метод

Download file from target URL
public static download ( string $url, string $target ) : boolean
$url string URL to download from
$target string Target file's name
Результат boolean True if download succeeded
    public static function download($url, $target)
    {
        if (file_exists($target)) {
            throw new TerminusException('Target file {target} already exists.', compact('target'));
        }
        $client = new Client();
        $response = $client->request('GET', $url, ['sink' => $target]);
        return true;
    }