local
class local implements adapter_interface, stream_interface
Experimental
Properties
protected filesystem | $filesystem | Filesystem component |
|
protected string | $phpbb_root_path | ||
protected string | $root_path | Absolute path to the storage folder Always finish with DIRECTORY_SEPARATOR Example:
|
|
protected string | $path | Relative path from $phpbb_root_path to the storage folder Always finish with slash (/) character Example:
|
Methods
Set adapter parameters
Dumps content into a file
Read the contents of a file
Checks the existence of files or directories
Removes files or directories
Rename a file or a directory
Copies a file
Creates a directory recursively.
Ensures that the directory of a file exists.
Get the path to the file
To be used in other PR
Reads a file as a stream
Writes a new file using a stream
Get file size in bytes
Get space available in bytes
Details
at line 66
__construct(filesystem $filesystem, string $phpbb_root_path)
Constructor
at line 75
void
configure(array $options)
Set adapter parameters
at line 90
void
put_contents(string $path, string $content)
Dumps content into a file
at line 107
string
get_contents(string $path)
Read the contents of a file
at line 122
bool
exists(string $path)
Checks the existence of files or directories
at line 130
void
delete(string $path)
Removes files or directories
at line 145
void
rename(string $path_orig, string $path_dest)
Rename a file or a directory
at line 162
void
copy(string $path_orig, string $path_dest)
Copies a file
at line 183
protected void
create_dir(string $path)
Creates a directory recursively.
at line 202
protected void
ensure_directory_exists(string $path)
Ensures that the directory of a file exists.
at line 219
protected string
get_path(string $path)
Get the path to the file
at line 233
protected string
get_filename(string $path)
To be used in other PR
at line 241
resource
read_stream(string $path)
Reads a file as a stream
at line 256
void
write_stream(string $path, resource $resource)
Writes a new file using a stream
at line 279
int
file_size(string $path)
Get file size in bytes
at line 294
float
free_space()
Get space available in bytes