org\bovigo\vfs\vfsStreamDirectory::addChild PHP Метод

addChild() публичный Метод

adds child to the directory
public addChild ( org\bovigo\vfs\vfsStreamContent $child )
$child org\bovigo\vfs\vfsStreamContent
    public function addChild(vfsStreamContent $child)
    {
        $child->setParentPath($this->path());
        $this->children[$child->getName()] = $child;
        $this->updateModifications();
    }

Usage Example

 protected function setUp()
 {
     $file = vfsStream::newFile('template');
     $this->fileSystem = vfsStream::setup();
     $this->fileSystem->addChild($file);
     $this->filePath = $file->url();
 }
All Usage Examples Of org\bovigo\vfs\vfsStreamDirectory::addChild