Filesystem
class Filesystem (View source)
Class Filesystem
Methods
static bool
copy(string $src, string $dest, bool $force = false)
copy
static bool
move(string $src, string $dest, bool $force = false)
move
static bool
delete(string $path)
delete
static CallbackFilterIterator
files(string $path, bool $recursive = false, bool $toArray = false)
files
static CallbackFilterIterator
folders(string $path, bool $recursive = false, boolean $toArray = false)
folders
static CallbackFilterIterator
items(string $path, bool $recursive = false, boolean $toArray = false)
items
static SplFileInfo
findOne(string $path, mixed $condition, boolean $recursive = false)
Find one file and return.
static CallbackFilterIterator
find(string $path, mixed $condition, boolean $recursive = false, boolean $toArray = false)
Find all files which matches condition.
static CallbackFilterIterator
findByCallback(string $path, Closure $callback, boolean $recursive = false, boolean $toArray = false)
Using a closure function to filter file.
createIterator(string $path, boolean $recursive = false, integer $options = null)
Create file iterator of current dir.
static array
Details
at line line 35
static bool
copy(string $src, string $dest, bool $force = false)
copy
at line line 58
static bool
move(string $src, string $dest, bool $force = false)
move
at line line 79
static bool
delete(string $path)
delete
at line line 102
static CallbackFilterIterator
files(string $path, bool $recursive = false, bool $toArray = false)
files
at line line 130
static CallbackFilterIterator
folders(string $path, bool $recursive = false, boolean $toArray = false)
folders
at line line 173
static CallbackFilterIterator
items(string $path, bool $recursive = false, boolean $toArray = false)
items
at line line 225
static SplFileInfo
findOne(string $path, mixed $condition, boolean $recursive = false)
Find one file and return.
at line line 253
static CallbackFilterIterator
find(string $path, mixed $condition, boolean $recursive = false, boolean $toArray = false)
Find all files which matches condition.
at line line 316
static CallbackFilterIterator
findByCallback(string $path, Closure $callback, boolean $recursive = false, boolean $toArray = false)
Using a closure function to filter file.
Reference: http://www.php.net/manual/en/class.callbackfilteriterator.php
at line line 338
static FilesystemIterator|RecursiveIteratorIterator
createIterator(string $path, boolean $recursive = false, integer $options = null)
Create file iterator of current dir.
at line line 371
static array
iteratorToArray(Traversable $iterator)
iteratorToArray