first commit

This commit is contained in:
René Preuß
2021-07-19 20:55:01 +02:00
commit f42347aa99
33 changed files with 8074 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Bunny\Filesystem;
class LocalStorage
{
function allFiles($dir, &$results = array())
{
$files = scandir($dir);
foreach ($files as $value) {
$path = realpath($dir . DIRECTORY_SEPARATOR . $value);
if (!is_dir($path)) {
$results[] = new LocalFile($path, strtoupper(hash_file('sha256', $path)));
} else if ($value != "." && $value != "..") {
$results[] = new LocalFile($path, null);
$this->allFiles($path, $results);
}
}
return $results;
}
}