phpBB API Documentation
Interface

phpbb\storage\adapter\adapter_interface

interface adapter_interface

Methods

configure(array $options)

Set adapter parameters

put_contents(string $path, string $content)

Dumps content into a file

string get_contents(string $path)

Read the contents of a file

bool exists(string $path)

Checks the existence of files or directories

delete(string $path)

Removes files or directories

rename(string $path_orig, string $path_dest)

Rename a file or a directory

copy(string $path_orig, string $path_dest)

Copies a file

string get_link(string $path)

Get direct link

free_space()

Details

at line 23
public configure(array $options)

Set adapter parameters

Parameters

array $options options Storage-specific options.

at line 33
public put_contents(string $path, string $content)

Dumps content into a file

Parameters

string $path path The file to be written to.
string $content content The data to write into the file.

Exceptions

exception When the file cannot be written

at line 45
public string get_contents(string $path)

Read the contents of a file

Parameters

string $path The file to read

Return Value

string Returns file contents

Exceptions

exception When cannot read file contents

at line 54
public bool exists(string $path)

Checks the existence of files or directories

Parameters

string $path file/directory to check

Return Value

bool Returns true if the file/directory exist, false otherwise.

at line 63
public delete(string $path)

Removes files or directories

Parameters

string $path file/directory to remove

Exceptions

exception When removal fails.

at line 73
public rename(string $path_orig, string $path_dest)

Rename a file or a directory

Parameters

string $path_orig The original file/direcotry
string $path_dest The target file/directory

Exceptions

exception When file/directory cannot be renamed

at line 83
public copy(string $path_orig, string $path_dest)

Copies a file

Parameters

string $path_orig The original filename
string $path_dest The target filename

Exceptions

exception When the file cannot be copied

Get direct link

Parameters

string $path The file

Return Value

string Returns link.

at line 102
public free_space()