mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 22:18:40 +00:00
Static list function
This commit is contained in:
parent
a937a4f8aa
commit
62399ac021
|
|
@ -72,6 +72,17 @@ class Directory extends FileAbstract implements DirectoryInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function list(string $path, string $filter = '*') : array
|
||||||
|
{
|
||||||
|
$list = [];
|
||||||
|
|
||||||
|
foreach (glob($path . DIRECTORY_SEPARATOR . $filter) as $filename) {
|
||||||
|
$list[] = $filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user