3 * This file is part of vfsStream.
5 * For the full copyright and license information, please view the LICENSE
6 * file that was distributed with this source code.
8 * @package org\bovigo\vfs
10 namespace org\bovigo\vfs;
12 * Interface for stream contents that are able to store other stream contents.
14 interface vfsStreamContainer extends \IteratorAggregate
17 * adds child to the directory
19 * @param vfsStreamContent $child
21 public function addChild(vfsStreamContent $child);
24 * removes child from the directory
29 public function removeChild($name);
32 * checks whether the container contains a child with the given name
37 public function hasChild($name);
40 * returns the child with the given name
43 * @return vfsStreamContent
45 public function getChild($name);
48 * checks whether directory contains any children
53 public function hasChildren();
56 * returns a list of children for this directory
58 * @return vfsStreamContent[]
60 public function getChildren();