mirror of
https://github.com/YGGverse/gemini-php.git
synced 2026-04-01 09:25:29 +00:00
add index blacklist settings
This commit is contained in:
parent
79fd257589
commit
fe2e6502e6
1 changed files with 2 additions and 2 deletions
|
|
@ -163,11 +163,11 @@ class Filesystem
|
||||||
return $path;
|
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)
|
foreach ((array) scandir($path) as $file)
|
||||||
{
|
{
|
||||||
if (in_array($file, ['.', '..']) || str_starts_with($file, '__'))
|
if (in_array($file, $blacklist))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue