dev-master
9999999-dev https://github.com/danbettles/disqDisq's fluent interface makes it easier to traverse and manipulate the filesystem.
MIT
The Requires
- php >=5.4.0
by Dan Bettles
file filesystem directory fluent splfileinfo
Wallogit.com
2017 © Pedro Peláez
Disq's fluent interface makes it easier to traverse and manipulate the filesystem.
Disq is a very small library for PHP 5.4+ that makes it easier to traverse and manipulate the filesystem. It provides a simple, fluent interface that should feel familiar to users of jQuery., (*1)
Also see tests/examples.php., (*2)
Disq(__DIR__ . '/*.*')->each(function () {
//The Disq class (partially) decorates `SplFileInfo`, which is where `getRealPath()` comes from.
print $this->getRealPath() . "\n";
});
Disq('*.*', __DIR__)->each(function () {
print $this->getRealPath() . "\n";
});
Disq('*', __DIR__)->each(function () {
if ($this->isFile()) {
print $this->getRealPath() . "\n";
}
});
Disq('*.*', __DIR__)->each(function () {
//`getInfo()` returns a `SplFileInfo` object for the current matched path.
print $this->getInfo()->getRealPath() . "\n";
});
Install using Composer., (*3)
composer require danbettles/disq:dev-master
Disq's fluent interface makes it easier to traverse and manipulate the filesystem.
MIT
file filesystem directory fluent splfileinfo