/PhpFileFinder

Php Class That Find Files With Conditions

Primary LanguagePHPApache License 2.0Apache-2.0

organikhaberlesme.com için PHP API Sınıfıdır.

KURULUM

// Include The Class (You have to download the files first)
include './src/Finder.php';

Definition

$finder = new Finder('./controller/admin');

Select files with extension

$files = $finder->extension('php')->get();

Select files with last update time

$files = $finder->date(strtotime("-1 day"), '<')->get();

Select files that contain any word

$files = $finder->contain('throw')->get();

Select files with name

$files = $finder->include('dashboard.php')->get();

Select files except hast the name

$files = $finder->exclude('dashboard.php')->get();

Delete Files

just change get with delete

$files = $finder->exclude('dashboard.php')->delete();

Print Files

echo json_encode($files, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);