4 * The ICollection Interface
6 * This interface should be implemented by each class that represents a collection
10 * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
11 * @author Evert Pot (http://www.rooftopsolutions.nl/)
12 * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
14 interface Sabre_DAV_ICollection extends Sabre_DAV_INode {
17 * Creates a new file in the directory
19 * Data will either be supplied as a stream resource, or in certain cases
20 * as a string. Keep in mind that you may have to support either.
22 * After successful creation of the file, you may choose to return the ETag
23 * of the new file here.
25 * The returned ETag must be surrounded by double-quotes (The quotes should
26 * be part of the actual string).
28 * If you cannot accurately determine the ETag, you should not return it.
29 * If you don't store the file exactly as-is (you're transforming it
30 * somehow) you should also not return an ETag.
32 * This means that if a subsequent GET to this new file does not exactly
33 * return the same contents of what was submitted here, you are strongly
34 * recommended to omit the ETag.
36 * @param string $name Name of the file
37 * @param resource|string $data Initial payload
40 function createFile($name, $data = null);
43 * Creates a new subdirectory
48 function createDirectory($name);
51 * Returns a specific child node, referenced by its name
53 * This method must throw Sabre_DAV_Exception_NotFound if the node does not
57 * @return Sabre_DAV_INode
59 function getChild($name);
62 * Returns an array with all the child nodes
64 * @return Sabre_DAV_INode[]
66 function getChildren();
69 * Checks if a child-node with the specified name exists
74 function childExists($name);