1 | <?php |
||
9 | class DirectoryCleaner |
||
10 | { |
||
11 | /** @var \Illuminate\Contracts\Filesystem\Filesystem */ |
||
12 | protected $filesystem; |
||
13 | |||
14 | /** @var string */ |
||
15 | protected $directory; |
||
16 | |||
17 | /** |
||
18 | * DirectoryCleaner constructor. |
||
19 | */ |
||
20 | public function __construct() |
||
25 | |||
26 | /** |
||
27 | * @param string $directory |
||
28 | * |
||
29 | * @return $this |
||
30 | */ |
||
31 | public function setDirectory(string $directory) |
||
37 | |||
38 | /** |
||
39 | * @param string $driver |
||
40 | * |
||
41 | * @return $this |
||
42 | */ |
||
43 | public function setFileSystemDriver(string $driver) |
||
49 | |||
50 | /** |
||
51 | * @param int $minutes |
||
52 | * |
||
53 | * @return \Illuminate\Support\Collection |
||
54 | */ |
||
55 | public function deleteFilesOlderThanMinutes(int $minutes): Collection |
||
69 | } |
||
70 |