cline/globby

User-friendly glob matching for PHP with negation patterns, directory expansion, and gitignore support

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/cline/globby

1.0.2 2025-12-02 15:46 UTC

This package is auto-updated.

Last update: 2025-12-04 03:54:33 UTC


README

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads

Globby

A user-friendly glob matching library for PHP, inspired by sindresorhus/globby. Features multiple pattern support, negation patterns, gitignore integration, and a fluent configuration API.

Requirements

Requires PHP 8.4+

Installation

composer require cline/globby

Documentation

  • Basic Usage - Pattern matching fundamentals, multiple patterns, negation, and streaming
  • Filtering Options - Files vs directories, dotfiles, depth limiting, and path formatting
  • Gitignore Integration - Respecting .gitignore rules and custom ignore files
  • Advanced Patterns - Brace expansion, character classes, globstar, and escaping

Supported Options

Option Type Default Description
cwd string getcwd() Current working directory
expandDirectories bool|array true Auto-expand directories to glob contents
gitignore bool false Respect .gitignore rules
ignoreFiles string|array null Custom ignore file patterns
ignore array [] Additional patterns to ignore
onlyFiles bool true Match only files
onlyDirectories bool false Match only directories
dot bool false Include dotfiles
deep int null Maximum traversal depth
followSymbolicLinks bool true Follow symbolic links
suppressErrors bool false Suppress file system errors
absolute bool false Return absolute paths
unique bool true Deduplicate results
markDirectories bool false Add trailing slash to directories
caseSensitiveMatch bool true Case-sensitive pattern matching
baseNameMatch bool false Match patterns against basename only
throwErrorOnBrokenSymbolicLink bool false Throw error on broken symlinks
objectMode bool false Return GlobEntry objects instead of strings
stats bool false Include file statistics (implies objectMode)
fs FileSystemAdapter null Custom file system adapter

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.