Guides

FlySystemAdapter
in package
implements FileSystem

Table of Contents

Interfaces

FileSystem

Properties

$filesystem  : FileSystem

Methods

__construct()  : mixed
createForPath()  : self
createFromFileSystem()  : self
find()  : array<string|int, StorageAttributes>
has()  : bool
Check whether a file exists.
listContents()  : array<string|int, StorageAttributes>
put()  : bool
read()  : string|false
Read a file.
readStream()  : resource|false
Retrieves a read-stream for a path.

Properties

Methods

createForPath()

public static createForPath(string $path) : self
Parameters
$path : string
Return values
self

createFromFileSystem()

public static createFromFileSystem(Filesystem|FilesystemInterface $filesystem) : self
Parameters
$filesystem : Filesystem|FilesystemInterface
Return values
self

has()

Check whether a file exists.

public has(string $path) : bool
Parameters
$path : string
Return values
bool

listContents()

public listContents([string $directory = '' ][, bool $recursive = false ]) : array<string|int, StorageAttributes>
Parameters
$directory : string = ''
$recursive : bool = false
Return values
array<string|int, StorageAttributes>

put()

public put(string $path, string $contents) : bool
Parameters
$path : string
$contents : string
Return values
bool

read()

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.


        
On this page

Search results