mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-20 05:18:42 +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}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user