/** * * * @param string $file * @throws SPException * @return bool */ public static function delete($file) { $file = self::fixPath($file); if (is_dir($file)) { if ($file == SOBI_ROOT || dirname($file) == SOBI_ROOT) { throw new SPException(SPLang::e('Fatal error. Trying to delete not allowed path "%s"', $file)); } return Jfolder::delete($file); } else { return Jfile::delete($file); } }