mirror of
https://github.com/YGGverse/gemini-php.git
synced 2025-02-05 03:34:33 +00:00
add index blacklist settings
This commit is contained in:
parent
79fd257589
commit
fe2e6502e6
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user