storage
class storage
Experimental
Properties
protected adapter_interface | $adapter | ||
protected adapter_factory | $factory | ||
protected file_tracker | $file_tracker | ||
protected string | $storage_name |
Methods
string
get_name()
Returns storage name
mixed
get_adapter()
Returns an adapter instance
resource
read(string $path)
Reads a file as a stream
void
write(string $path, resource $resource)
Writes a new file using a stream
void
delete(string $path)
Removes files or directories
bool
exists(string $path)
Checks the existence of files or directories
int
file_size(string $path)
Get file size in bytes
int
total_files()
Return the number of files stored in this storage
float
total_size()
Get total storage size
float
free_space()
Get space available in bytes
Details
at line 51
__construct(adapter_factory $factory, file_tracker $file_tracker, string $storage_name)
Constructor
at line 63
string
get_name()
Returns storage name
at line 73
protected mixed
get_adapter()
Returns an adapter instance
at line 93
resource
read(string $path)
Reads a file as a stream
at line 112
void
write(string $path, resource $resource)
Writes a new file using a stream
at line 136
void
delete(string $path)
Removes files or directories
at line 154
bool
exists(string $path)
Checks the existence of files or directories
at line 166
int
file_size(string $path)
Get file size in bytes
at line 176
int
total_files()
Return the number of files stored in this storage
at line 186
float
total_size()
Get total storage size
at line 198
float
free_space()
Get space available in bytes