Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finder::find() - Filtr callback se zavolá jen na složky #1534

Closed
bendovercz opened this issue Jul 13, 2015 · 3 comments
Closed

Finder::find() - Filtr callback se zavolá jen na složky #1534

bendovercz opened this issue Jul 13, 2015 · 3 comments

Comments

@bendovercz
Copy link

Ahoj, dnes jsem narazil na problém s Finderem. Pokud hledám složky i soubory a chci na ně aplikovat filter(), tak jeho callback se zavolá jen u složek.

Nette\Utils\Finder::find('*')->in('/data/files/')->filter(function($file) {
    # Tento callback odfiltruje jen složky
    return false;
});

Používám Nette 2.3.3.

@dg
Copy link
Member

dg commented Aug 22, 2015

Zkus zavolat filter před in.

@bendovercz
Copy link
Author

@dg Tak to pro změnu vyfiltruje pouze soubory.

@dg
Copy link
Member

dg commented Aug 23, 2015

Ano, první je pro soubory a druhý pro adresáře.

@dg dg closed this as completed Aug 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants