Redaxscript\Directory::_remove PHP Method

_remove() protected method

remove the path
Since: 3.0.0
protected _remove ( string $path = null )
$path string name of the path
    protected function _remove($path = null)
    {
        if (is_dir($path)) {
            foreach ($this->_scan($path) as $value) {
                $this->_remove($path . '/' . $value);
            }
            if ($path !== $this->_directory) {
                rmdir($path);
            }
        } else {
            if (is_file($path)) {
                unlink($path);
            }
        }
    }