Download the PHP package lechimp-p/flightcontrol without Composer
On this page you can find all versions of the php package lechimp-p/flightcontrol. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lechimp-p/flightcontrol
More information about lechimp-p/flightcontrol
Files in lechimp-p/flightcontrol
Package flightcontrol
Short Description An interface for iterationr and recursion in directories over the leagues flysystem.
License GPL-3.0-or-later
Homepage https://github.com/lechimp-p/flightcontrol
Informations about the package flightcontrol
Flightcontrol
An interface for iteration and recursion over the Leagues flysystem.
This README.md is also a literate PHP-file.
This code is released under the GPLv3 License
Usage
Initialisation
The flightcontrol is initialized over a flysystem, e.g. as such:
Make sure us use the Local::SKIP_LINKS
-option when using flightcontrol, as it
will only handle files and directories.
Filesystem Objects
The flightcontrol can give you objects from the flystem:
Note that you could use Flightcontrol::get
to either get a directory or file,
and Flightcontrol::directory
to get a directory or Flightcontrol::file
to
get a file respectively. These getters will return null if there is no matching
object on the flysystem.
You could also use FSObject::toDirectory
or FSObject::toFile
to force an
FSObject to a file or directory, where you get a null
if the object is not
what you want it to be.
Properties of Filesystem Object
The objects returned from the flightcontrol have different properties:
File::content
returns the content of the file as string. Directory::contents
gives you a list of filesystem objects in the directory.