phpDocumentor

Filesystem

Interface Filesystem

Tags
deprecated

Table of Contents

create()  : void
Creates a new file with the provided path and content.
delete()  : void
Deletes an existing file.
getBaseDirectory()  : string
Returns the base directory.
has()  : bool
Check whether a file exists.
list()  : DirectoryItems
List content of a directory.
read()  : string|null
Returns content of a file by the provided path.
update()  : void
Creates or updates a file with the provided path and content.

Methods

create()

Creates a new file with the provided path and content.

public create(string $path[, string $content = '' ]) : void
Parameters
$path : string
$content : string = ''
Tags
throws
FilesystemException

If file could not be created or already exists.

deprecated
Return values
void

delete()

Deletes an existing file.

public delete(string $path) : void
Parameters
$path : string
Tags
throws
FilesystemException

If file could not be deleted.

deprecated
Return values
void

getBaseDirectory()

Returns the base directory.

public getBaseDirectory() : string
Tags
deprecated
Return values
string

has()

Check whether a file exists.

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

list()

List content of a directory.

public list(string $directory[, bool $recursive = false ]) : DirectoryItems
Parameters
$directory : string

Relative path to directory.

$recursive : bool = false
Tags
deprecated
Return values
DirectoryItems

read()

Returns content of a file by the provided path.

public read(string $path) : string|null
Parameters
$path : string

Relative path to file.

Tags
deprecated
Return values
string|null

Returns null if file doesn't exist.

update()

Creates or updates a file with the provided path and content.

public update(string $path, string $content) : void
Parameters
$path : string
$content : string
Tags
throws
FilesystemException

If file could not be created/updated.

deprecated
Return values
void

Search results