org\bovigo\vfs\vfsStreamDirectory::removeChild PHP Method

removeChild() public method

removes child from the directory
public removeChild ( string $name ) : boolean
$name string
return boolean
    public function removeChild($name)
    {
        foreach ($this->children as $key => $child) {
            if ($child->appliesTo($name)) {
                $child->setParentPath(null);
                unset($this->children[$key]);
                $this->updateModifications();
                return true;
            }
        }
        return false;
    }

Usage Example

 public function testNoIncludeFile()
 {
     /*
      * include file not found means output + empty $packages
      */
     $this->root->removeChild('include');
     $this->assertEmpty($this->selection->load());
 }
All Usage Examples Of org\bovigo\vfs\vfsStreamDirectory::removeChild