| 1 | <?php |
||
| 9 | class DirectoryCleaner |
||
| 10 | { |
||
| 11 | /** @var \Illuminate\Filesystem\Filesystem */ |
||
| 12 | protected $filesystem; |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | protected $directory; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param \Illuminate\Filesystem\Filesystem $filesystem |
||
| 19 | */ |
||
| 20 | public function __construct(Filesystem $filesystem) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $directory |
||
| 27 | * |
||
| 28 | * @return $this |
||
| 29 | */ |
||
| 30 | public function setDirectory(string $directory) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param int $minutes |
||
| 39 | * |
||
| 40 | * @return \Illuminate\Support\Collection |
||
| 41 | */ |
||
| 42 | public function deleteFilesOlderThanMinutes(int $minutes) : Collection |
||
| 60 | } |
||
| 61 |