定制 degraciamathieu/php-file-explorer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

degraciamathieu/php-file-explorer

最新稳定版本:v0.4.1

Composer 安装命令:

composer require degraciamathieu/php-file-explorer

包简介

README 文档

README

PHP Composer packagist packagist

php-file-explorer

Code originally taken from bmitch/churn-php

composer require degraciamathieu/php-file-explorer

Usage

use DeGraciaMathieu\FileExplorer\FileFinder;

$fileFinder = new FileFinder(
    basePath: __DIR__,
);

$files = $fileFinder->getFiles();

foreach ($files as $file) {

   # DeGraciaMathieu\FileExplorer\File
   $file->fullPath;
   $file->displayPath;
}
$fileFinder = new FileFinder(
    basePath: 'app/Modules/', 
    onlyPatterns: [
        '.*/Logics/.*',
        '.*Logic.php',
    ],
);

$files = $fileFinder->getFiles();
$fileFinder = new FileFinder(
    basePath: 'app/Modules/', 
    ignorePatterns: [
        '.*/Repositories/.*',
    ],
);

$files = $fileFinder->getFiles();
$fileFinder = new FileFinder(
    basePath: 'app/', 
);

$files = $fileFinder->getFiles([
    'Models/.*',
    'Services/.*',
]);

Tests

make test
make coverage

统计信息

  • 总下载量: 2.6k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-26