mirror of
https://github.com/YGGverse/gemini-php.git
synced 2025-01-13 08:38:01 +00:00
ignore hidden files index
This commit is contained in:
parent
003b822890
commit
971baa9df2
@ -223,10 +223,18 @@ class Filesystem
|
||||
return false;
|
||||
}
|
||||
|
||||
private function _index(string $path, ?array $blacklist = ['.', '..', 'sidebar.txt', '__template.txt']): void
|
||||
private function _index(
|
||||
string $path,
|
||||
?array $blacklist = ['sidebar.txt', '__template.txt']
|
||||
): void
|
||||
{
|
||||
foreach ((array) scandir($path) as $file)
|
||||
{
|
||||
if (str_starts_with($file, '.'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($file, $blacklist))
|
||||
{
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user