[-] BO : FixBug #PSCFV-10291 - Remove temporary image on install

This commit is contained in:
Jerome Nadaud
2013-09-30 19:01:11 +02:00
parent b7ff8d634a
commit 1b9472cc37
2 changed files with 16 additions and 1 deletions
+15
View File
@@ -704,6 +704,21 @@ class ToolsCore
}
return false;
}
/**
* Delete file
*
* @param string File path
* @param array Excluded files
*/
public static function deleteFile($file, $exclude_files = array())
{
if (isset($exclude_files) && !is_array($exclude_files))
$exclude_files = array($exclude_files);
if (file_exists($file) && is_file($file) && array_search(basename($file), $exclude_files) === FALSE)
unlink($file);
}
/**
* Clear smarty cache folders