Skip to content

ExcludeFiles [READY CODE] #32

@Pok4

Description

@Pok4

Ok, i find a way to fix my things in #31
Sorry for my english is not good at all...

Ok, open RobotLoader.php and find:
private array $excludeDirs = [];
after this line add:
private array $excludeFiles = [];

find:

public function excludeDirectory(string ...$paths): static
{
	$this->excludeDirs = array_merge($this->excludeDirs, $paths);
	return $this;
}

after this add:

public function excludeFiles($files)
{
	$this->excludeFiles = $files;
	return $this;
}

find:
exclude($this->ignoreDirs);
make it like this:
exclude($this->ignoreDirs)->exclude($this->excludeFiles);

After that you can use:
$loader->excludeFiles(['sql.php','en.php','es.php','bg.php','fr.php','ru.php','migrate.php']);

excludeDirs is working normal with this addon (i tested it).
Can you commit the changes ? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions