# symfony/finder

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/symfony-finder).**

8,445 stars · 55 forks · PHP · MIT

## Links

- GitHub: https://github.com/symfony/finder
- Homepage: https://symfony.com/finder
- awesome-repositories: https://awesome-repositories.com/repository/symfony-finder.md

## Topics

`component` `php` `symfony` `symfony-component`

## Description

This project is a PHP filesystem search component and file filtering library. It provides an object-oriented filesystem iterator designed to locate files and directories based on specific criteria.

The library includes a project ignore file parser that allows the search process to respect version control exclusion patterns and metadata to skip unnecessary files.

It covers a wide range of filtering capabilities, including the ability to isolate entries by name, path, size, and modification date. The tool also supports content-based filtering, type-based restrictions, and custom logic functions to exclude specific files or directory branches. Results can be sorted by name, size, type, or time, and the search depth can be limited to specific directory levels.

## Tags

### System Administration & Monitoring

- [Filesystem Discovery Utilities](https://awesome-repositories.com/f/system-administration-monitoring/filesystem-discovery-utilities.md) — Provides a comprehensive toolkit for locating files and directories across a filesystem using name, size, and date criteria.

### Part of an Awesome List

- [File and Directory Management](https://awesome-repositories.com/f/awesome-lists/devtools/file-and-directory-management.md) — Locates files and folders across multiple locations using wildcards and directory exclusions. ([source](https://cdn.jsdelivr.net/gh/symfony/finder@8.2/README.md))

### Development Tools & Productivity

- [Complex Filesystem Filtering](https://awesome-repositories.com/f/development-tools-productivity/complex-filesystem-filtering.md) — Applies complex logic and regular expressions to isolate specific sets of files based on properties and paths.
- [Filesystem Name Filters](https://awesome-repositories.com/f/development-tools-productivity/file-pattern-matching/name-pattern-filters/filesystem-name-filters.md) — Provides the ability to include or exclude files by matching their names against strings, globs, or regular expressions. ([source](https://symfony.com/doc/current/components/finder.html))
- [Filesystem Entry Type Filters](https://awesome-repositories.com/f/development-tools-productivity/filesystem-entry-type-filters.md) — Enables restricting search results specifically to files, directories, or both. ([source](https://symfony.com/doc/current/components/finder.html))
- [Filesystem Path Filters](https://awesome-repositories.com/f/development-tools-productivity/filesystem-path-filters.md) — Implements the ability to include or exclude files and directories by matching their filesystem paths. ([source](https://symfony.com/doc/current/components/finder.html))
- [Size-Based File Filtering](https://awesome-repositories.com/f/development-tools-productivity/local-file-syncing/large-file-scanners/size-based-file-filtering.md) — Allows filtering of files based on their byte size using comparison operators and human-readable measurements. ([source](https://symfony.com/doc/current/components/finder.html))
- [PHP Filesystem Filtering Libraries](https://awesome-repositories.com/f/development-tools-productivity/php-filesystem-filtering-libraries.md) — Offers a PHP tool for including or excluding filesystem entries using glob patterns, regular expressions, and custom logic.
- [PHP Filesystem Search Components](https://awesome-repositories.com/f/development-tools-productivity/php-filesystem-search-components.md) — Implements a specialized PHP library for locating files and directories using a fluent interface and complex filtering.
- [Version Control Ignore Parsers](https://awesome-repositories.com/f/development-tools-productivity/version-control-ignore-parsers.md) — Includes a parser that respects standard version control ignore files to skip unnecessary files during search.
- [Version Control Ignore Rules](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/environment-provisioning-configuration/development-environment-configurations/version-control-ignore-rules.md) — Respects version control exclusion patterns and metadata to skip unnecessary files during search. ([source](https://symfony.com/doc/current/components/finder.html))
- [File Content Filtering](https://awesome-repositories.com/f/development-tools-productivity/file-content-filtering.md) — Includes or excludes files by checking if their internal text matches specific strings or regular expression patterns. ([source](https://symfony.com/doc/current/components/finder.html))
- [Filesystem Search Result Sorting](https://awesome-repositories.com/f/development-tools-productivity/filesystem-search-result-sorting.md) — Provides natural sorting of matching files and directories by name, size, type, or time. ([source](https://symfony.com/doc/current/components/finder.html))
- [Project-Wide Source Analyzers](https://awesome-repositories.com/f/development-tools-productivity/project-configuration/project-metadata-analyzers/project-wide-source-analyzers.md) — Scans source code directories to analyze file contents and patterns while respecting version control exclusion rules.

### Software Engineering & Architecture

- [Fluent Interfaces](https://awesome-repositories.com/f/software-engineering-architecture/fluent-interfaces.md) — Provides a fluent interface for building complex filesystem search configurations via method chaining.
- [Iterator-Based Filesystem Traversal](https://awesome-repositories.com/f/software-engineering-architecture/iterator-based-filesystem-traversal.md) — Wraps filesystem searches in an iterator to stream results one by one instead of loading all files into memory.
- [Recursive Directory Traversers](https://awesome-repositories.com/f/software-engineering-architecture/recursive-validation-engines/recursive-tree-traversers/file-system-traversers/recursive-directory-traversers.md) — Implements recursive directory traversal algorithms to locate matching files and directories within nested structures.
- [Directory Iterators](https://awesome-repositories.com/f/software-engineering-architecture/recursive-validation-engines/recursive-tree-traversers/file-system-traversers/recursive-directory-traversers/directory-iterators.md) — Provides an object-oriented directory iterator for traversing and filtering filesystem entries.
- [Custom Logic Filtering Hooks](https://awesome-repositories.com/f/software-engineering-architecture/custom-logic-filtering-hooks.md) — Executes custom logic functions to exclude specific files or skip entire directory branches for performance optimization. ([source](https://symfony.com/doc/current/components/finder.html))
- [Filter Composition Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/filter-composition-pipelines.md) — Implements a composite pipeline to process files through a sequence of boolean checks for inclusion and exclusion.

### Data & Databases

- [Content Extraction](https://awesome-repositories.com/f/data-databases/content-extraction.md) — Extracts raw text content from identified files for internal data analysis. ([source](https://symfony.com/doc/current/components/finder.html))
- [Date-Based Filters](https://awesome-repositories.com/f/data-databases/search-indexing-technologies/search-indexing/search-and-indexing/content-search-filters/date-based-filters.md) — Filters files based on their last modification timestamp using various date formats and comparison operators. ([source](https://symfony.com/doc/current/components/finder.html))

### Education & Learning Resources

- [Recursion Depth Limits](https://awesome-repositories.com/f/education-learning-resources/depth-first-search-implementations/search-depth-limiting/recursion-depth-limits.md) — Controls the depth of recursive directory traversal to restrict search levels. ([source](https://symfony.com/doc/current/components/finder.html))

### Programming Languages & Runtimes

- [Lazy-Loaded Result Sets](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-class-creation/class-loading-mechanisms/lazy-loading/lazy-loaded-result-sets.md) — Defers actual disk scanning until the resulting iterator is looped over by the calling code.
