function flash_cron in Flash Node 5
Implements hook_cron (delete old temp files)
File
- ./
flash.module, line 148
Code
function flash_cron() {
$path = variable_get('flash_default_path', 'flash') . '/temp';
$files = file_scan_directory(file_create_path($path), '.*');
foreach ($files as $file => $info) {
if (time() - filemtime($file) > 60 * 60 * 6) {
file_delete($file);
}
}
}