Mediamanager\Controller\Mediamanager::removefiles PHP Method

removefiles() protected method

protected removefiles ( )
    protected function removefiles()
    {
        $paths = (array) $this->param('paths', array());
        foreach ($paths as $path) {
            $delpath = $this->root . '/' . trim($path, '/');
            if (is_dir($delpath)) {
                $this->_rrmdir($delpath);
            }
            if (is_file($delpath)) {
                unlink($delpath);
            }
        }
        return json_encode(array("success" => true));
    }