Subversion-Projekte lars-tiefland.laravel_shop

Revision

Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 * This file is part of Psy Shell.
5
 *
6
 * (c) 2012-2022 Justin Hileman
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
namespace Psy\VersionUpdater;
13
 
14
use Psy\Exception\ErrorException;
15
 
16
interface Downloader
17
{
18
    /**
19
     * Set the directory where the download will be written to.
20
     *
21
     * @param string $tempDir
22
     */
23
    public function setTempDir(string $tempDir);
24
 
25
    /**
26
     * @param string $url
27
     *
28
     * @return bool
29
     *
30
     * @throws ErrorException on failure
31
     */
32
    public function download(string $url): bool;
33
 
34
    /**
35
     * Get the temporary file name the download was written to.
36
     *
37
     * @return string
38
     */
39
    public function getFilename(): string;
40
 
41
    /**
42
     * Delete the downloaded file if it exists.
43
     *
44
     * @return void
45
     */
46
    public function cleanup();
47
}