Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Finder] Search by absolute file paths #4581

Closed
@EvanK

Description

@EvanK

I've found myself needing to search through groups of files by their absolute pathname versus just their filename (/home/jdoe/foo/bar/baz.txt versus baz.txt), in which case the Finder#name() and Finder#notName() filtering methods are not sufficient.

I'd like to suggest/discuss (and can put together a PR for) adding a PathFilterIterator class, along with Finder#path() and Finder#notPath() methods to accomplish this:

# ex: would find /home/jdoe/foo/bar.txt but not /home/jdoe/bar/baz.txt
$finder->files()->path('foo/*.txt')->notPath('bar/*.txt')->in('/home/jdoe')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions