2017 © Pedro Peláez
 

library disq

Disq's fluent interface makes it easier to traverse and manipulate the filesystem.

image

danbettles/disq

Disq's fluent interface makes it easier to traverse and manipulate the filesystem.

  • Tuesday, April 21, 2015
  • by danbettles
  • Repository
  • 2 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Disq

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)

Examples

Also see tests/examples.php., (*2)

List all files in the current directory

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";
});

Installation

Install using Composer., (*3)

composer require danbettles/disq:dev-master

TODO

  • Plugins.

The Versions

21/04 2015

dev-master

9999999-dev https://github.com/danbettles/disq

Disq's fluent interface makes it easier to traverse and manipulate the filesystem.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

file filesystem directory fluent splfileinfo