FileSystem
class FileSystem
Main 'access' class to vfs implementation. It will register new stream wrapper on instantiation.
This class provides methods to get access to Container as well as file URI helper.
Methods
Class constructor. Will register both, the stream default options and wrapper handler.
Returns wrapper scheme.
Remoces wrapper registered for scheme associated with FileSystem instance.
Returns absolute path to full URI path (with scheme)
Creates and returns a directory
Creates and returns a file
Creates fs structure
Creates and returns a link
Details
at line 40
__construct()
Class constructor. Will register both, the stream default options and wrapper handler.
Note: Each FileSystem instance will create NEW stream wrapper/scheme.
at line 58
string
scheme()
Returns wrapper scheme.
at line 80
__destruct()
Remoces wrapper registered for scheme associated with FileSystem instance.
at line 90
Container
container()
Returns Container instance.
at line 100
Root
root()
Returns Root instance.
at line 112
string
path(string $path)
Returns absolute path to full URI path (with scheme)
at line 128
Directory
createDirectory(string $path, bool $recursive = false, integer|null $mode = null)
Creates and returns a directory
at line 141
File
createFile(string $path, string|null $data = null)
Creates and returns a file
at line 151
createStructure(array $structure)
Creates fs structure
at line 164
Link
createLink(string $path, string $destinationPath)
Creates and returns a link