add index blacklist settings

This commit is contained in:
ghost 2024-02-02 13:04:22 +02:00
parent 79fd257589
commit fe2e6502e6

View File

@ -163,11 +163,11 @@ class Filesystem
return $path;
}
private function _index(string $path): void
private function _index(string $path, ?array $blacklist = ['.', '..', 'sidebar.txt', '__template.txt']): void
{
foreach ((array) scandir($path) as $file)
{
if (in_array($file, ['.', '..']) || str_starts_with($file, '__'))
if (in_array($file, $blacklist))
{
continue;
}