Conditions | 5 |
Paths | 5 |
Total Lines | 21 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
44 | public function getBackupFiles(): array |
||
45 | { |
||
46 | // get all objects matching our path prefix |
||
47 | $objects = $this->container->listObjects(['prefix' => $this->path]); |
||
48 | /** @var StorageObject $object */ |
||
49 | foreach ($objects as $object) { |
||
50 | // skip directories |
||
51 | if ($object->contentType == 'application/directory') { |
||
52 | continue; |
||
53 | } |
||
54 | // skip currently created backup |
||
55 | if ($object->name == $this->path . $this->target->getFilename()) { |
||
56 | continue; |
||
57 | } |
||
58 | if (preg_match('#' . $this->fileRegex . '#i', basename($object->name))) { |
||
59 | $this->files[] = new \phpbu\App\Backup\File\OpenStack($this->container, $object); |
||
60 | } |
||
61 | } |
||
62 | |||
63 | return $this->files; |
||
64 | } |
||
65 | } |
||
66 |