|
SimpleDirectory
Quickly setting up static tree structures
OverviewThe SimpleDirectory class allows you to easily build up static trees in your webdav filesystem. This is very useful if there is a part in your directory tree, thats read-only and doesn't often change. Using the SimpleDirectory class is very simple, all it takes is a name argument and a set of childnodes. Example
$root = new Sabre_DAV_SimpleDirectory('root',array(
new Sabre_DAV_SimpleDirectory('users'),
new Sabre_DAV_SimpleDirectory('files'),
new Sabre_DAV_SimpleDirectory('home')
));
$objectTree = new Sabre_DAV_ObjectTree($root);
As you can see, the children argument is optional. The children can be any object implementing Sabre_DAV_INode, and not just another SimpleDirectory. |
Sign in to add a comment