ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
The tree object is responsible for basic tree operations. More...
Public Member Functions | |
__construct (ICollection $rootNode) | |
Creates the object. More... | |
getNodeForPath ($path) | |
Returns the INode object for the requested path. More... | |
nodeExists ($path) | |
This function allows you to check if a node exists. More... | |
copy ($sourcePath, $destinationPath) | |
Copies a file from path to another. More... | |
move ($sourcePath, $destinationPath) | |
Moves a file from one location to another. More... | |
delete ($path) | |
Deletes a node from the tree. More... | |
getChildren ($path) | |
Returns a list of childnodes for a given path. More... | |
markDirty ($path) | |
This method is called with every tree update. More... | |
getMultipleNodes ($paths) | |
This method tells the tree system to pre-fetch and cache a list of children of a single parent. More... | |
Protected Member Functions | |
copyNode (INode $source, ICollection $destinationParent, $destinationName=null) | |
copyNode More... | |
Protected Attributes | |
$rootNode | |
$cache = [] | |
The tree object is responsible for basic tree operations.
It allows for fetching nodes by path, facilitates deleting, copying and moving.
Sabre\DAV\Tree::__construct | ( | ICollection | $rootNode | ) |
Creates the object.
This method expects the rootObject to be passed as a parameter
ICollection | $rootNode |
Definition at line 41 of file Tree.php.
References Sabre\DAV\Tree\$rootNode.
Sabre\DAV\Tree::copy | ( | $sourcePath, | |
$destinationPath | |||
) |
Copies a file from path to another.
string | $sourcePath | The source location |
string | $destinationPath | The full destination path |
Definition at line 122 of file Tree.php.
References Sabre\DAV\Tree\copyNode(), Sabre\DAV\Tree\getNodeForPath(), Sabre\DAV\Tree\markDirty(), and Sabre\HTTP\URLUtil\splitPath().
Referenced by Sabre\DAV\Tree\move().
|
protected |
copyNode
INode | $source | |
ICollection | $destinationParent | |
string | $destinationName |
Definition at line 299 of file Tree.php.
References $data, $destination, GuzzleHttp\Psr7\$stream, Sabre\DAV\ICollection\createDirectory(), Sabre\DAV\ICollection\createFile(), Sabre\DAV\ICollection\getChild(), and Sabre\DAV\INode\getName().
Referenced by Sabre\DAV\Tree\copy().
Sabre\DAV\Tree::delete | ( | $path | ) |
Deletes a node from the tree.
string | $path |
Definition at line 176 of file Tree.php.
References $path, Sabre\DAV\Tree\getNodeForPath(), Sabre\DAV\Tree\markDirty(), and Sabre\HTTP\URLUtil\splitPath().
Sabre\DAV\Tree::getChildren | ( | $path | ) |
Returns a list of childnodes for a given path.
string | $path |
Definition at line 192 of file Tree.php.
References $path, and Sabre\DAV\Tree\getNodeForPath().
Sabre\DAV\Tree::getMultipleNodes | ( | $paths | ) |
This method tells the tree system to pre-fetch and cache a list of children of a single parent.
There are a bunch of operations in the WebDAV stack that request many children (based on uris), and sometimes fetching many at once can optimize this.
This method returns an array with the found nodes. It's keys are the original paths. The result may be out of order.
array | $paths | List of nodes that must be fetched. |
Definition at line 253 of file Tree.php.
References $path, $paths, $result, Sabre\DAV\Tree\getNodeForPath(), and Sabre\HTTP\URLUtil\splitPath().
Sabre\DAV\Tree::getNodeForPath | ( | $path | ) |
Returns the INode object for the requested path.
string | $path |
Definition at line 53 of file Tree.php.
References $path, Sabre\DAV\Tree\$rootNode, and Sabre\HTTP\URLUtil\splitPath().
Referenced by Sabre\DAV\Tree\copy(), Sabre\DAV\Tree\delete(), Sabre\DAV\Tree\getChildren(), Sabre\DAV\Tree\getMultipleNodes(), Sabre\DAV\Tree\move(), and Sabre\DAV\Tree\nodeExists().
Sabre\DAV\Tree::markDirty | ( | $path | ) |
This method is called with every tree update.
Examples of tree updates are:
If Tree classes implement a form of caching, this will allow them to make sure caches will be expired.
If a path is passed, it is assumed that the entire subtree is dirty
string | $path |
Definition at line 226 of file Tree.php.
References $path.
Referenced by Sabre\DAV\Tree\copy(), Sabre\DAV\Tree\delete(), and Sabre\DAV\Tree\move().
Sabre\DAV\Tree::move | ( | $sourcePath, | |
$destinationPath | |||
) |
Moves a file from one location to another.
string | $sourcePath | The path to the file which should be moved |
string | $destinationPath | The full destination path, so not just the destination parent node |
Definition at line 143 of file Tree.php.
References $sourceDir, Sabre\DAV\Tree\copy(), Sabre\DAV\Tree\getNodeForPath(), Sabre\DAV\Tree\markDirty(), and Sabre\HTTP\URLUtil\splitPath().
Sabre\DAV\Tree::nodeExists | ( | $path | ) |
This function allows you to check if a node exists.
Implementors of this class should override this method to make it cheaper.
string | $path |
Definition at line 94 of file Tree.php.
References $base, $path, Sabre\DAV\Tree\getNodeForPath(), and Sabre\HTTP\URLUtil\splitPath().
|
protected |
Definition at line 24 of file Tree.php.
Referenced by Sabre\DAV\Tree\__construct(), and Sabre\DAV\Tree\getNodeForPath().