static function destroy($filename, $type = 'posts') { $path = PATH_UPLOAD; foreach (File::$config as $id => $values) { $fn = File::get_resized($filename, $id); if (is_file($path . $fn)) { unlink($path . $fn); } } }