czproject/file-matcher

File matcher.

Maintainers

👁 janpecha

Package info

github.com/czproject/file-matcher

pkg:composer/czproject/file-matcher

Statistics

Installs: 39

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2018-12-26 13:05 UTC

Requires

  • php: >=5.4.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause 0051c2672b33447b5e81a615f2632d8b0ccef255

This package is auto-updated.

Last update: 2026-06-27 05:38:13 UTC


README

👁 Build Status

Installation

Download a latest package or use Composer:

composer require czproject/file-matcher

CzProject\FileMatcher requires PHP 5.4.0 or later.

Usage

<?php

use CzProject\FileMatcher\FileMatcher;

FileMatcher::matchMask($path, $masks[, $isPathDirectory]);

$masks = array(
	'temp/*',
	'.git*',
	'!.gitignore',
);

FileMatcher::matchMask('.git', $masks, TRUE); // returns TRUE
FileMatcher::matchMask('.gitignore', $masks); // return FALSE
FileMatcher::matchMask('temp/cache', $masks, TRUE); // returns TRUE
FileMatcher::matchMask('log/2016', $masks, TRUE); // returns FALSE

License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/