mirror of
https://github.com/bitinflow/bunny-cli.git
synced 2026-11-01 13:19:15 +00:00
first commit
This commit is contained in:
33 files changed
+8074
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user