Container
class Container
Class to hold the filesystem structure as object representation. It also provides access and factory methods for file system management.
An instance of Container is registered as a default stream options when FileSystem class is instantiated - it is later used by streamWrapper implementation to interact with underlying object representation.
Methods
Class constructor. Sets factory and root object on init.
Checks whether filesystem has Node at given path
Returns directory at given path
Creates Directory at given path.
Creates link at given path
Creates file at given path
Creates struture
Moves Node from source to destination
Removes node at $path
Returns PermissionHelper with given node in context
Details
at line 50
__construct(Factory $factory)
Class constructor. Sets factory and root object on init.
at line 62
setFactory(Factory $factory)
Sets Factory instance
at line 72
Factory
factory()
Returns Factory instance
at line 82
Root
root()
Returns Root instance
at line 96
Node
nodeAt(string $path)
Returns filesystem Node|Directory|File|Root at given path.
at line 119
bool
hasNodeAt(string $path)
Checks whether filesystem has Node at given path
at line 140
Directory
directoryAt(string $path)
Returns directory at given path
at line 161
File
fileAt(string $path)
Returns file at given path
at line 183
Directory
createDir(string $path, bool $recursive = false, null|integer $mode = null)
Creates Directory at given path.
at line 215
Link
createLink(string $path, string $destination)
Creates link at given path
at line 241
File
createFile(string $path, string|null $data = null)
Creates file at given path
at line 264
createStructure(array $structure, string $parent = '/')
Creates struture
at line 284
bool
move(string $fromPath, string $toPath)
Moves Node from source to destination
at line 328
remove(string $path, bool $recursive = false)
Removes node at $path
at line 346
PermissionHelper
getPermissionHelper(Node $node)
Returns PermissionHelper with given node in context
at line 356
setPermissionHelper(PermissionHelper $permissionHelper)
Sets permission helper instance