FlysystemV3
in package
implements
FileSystem
FinalYes
Table of Contents
Interfaces
Properties
- $filesystem : Filesystem
- $finder : Finder
Methods
- __construct() : mixed
- find() : array<string|int, FileAttributes>
- has() : bool
- Check whether a file exists.
- listContents() : array<string|int, FileAttributes>
- put() : bool
- read() : string|false
- Read a file.
- readStream() : resource|false
- Retrieves a read-stream for a path.
Properties
$filesystem
private
Filesystem
$filesystem
$finder
private
Finder
$finder
Methods
__construct()
public
__construct(Filesystem $wrappedFilesystem) : mixed
Parameters
- $wrappedFilesystem : Filesystem
find()
public
find(SpecificationInterface $specification) : array<string|int, FileAttributes>
Parameters
- $specification : SpecificationInterface
Return values
array<string|int, FileAttributes>has()
Check whether a file exists.
public
has(string $path) : bool
Parameters
- $path : string
Return values
boollistContents()
public
listContents([string $directory = '' ][, bool $recursive = false ]) : array<string|int, FileAttributes>
Parameters
- $directory : string = ''
- $recursive : bool = false
Return values
array<string|int, FileAttributes>put()
public
put(string $path, string $contents) : bool
Parameters
- $path : string
- $contents : string
Return values
boolread()
Read a file.
public
read(string $path) : string|false
Parameters
- $path : string
-
The path to the file.
Return values
string|false —The file contents or false on failure.
readStream()
Retrieves a read-stream for a path.
public
readStream(string $path) : resource|false
Parameters
- $path : string
-
The path to the file.
Return values
resource|false —The path resource or false on failure.