function Smarty::_unlink in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/lib/smarty/Smarty.class.php \Smarty::_unlink()
unlink a file, possibly using expiration time
Parameters
string $resource:
integer $exp_time:
File
- includes/
moodle/ lib/ smarty/ Smarty.class.php, line 1760
Class
- Smarty
- @package Smarty
Code
function _unlink($resource, $exp_time = null) {
if (isset($exp_time)) {
if (time() - @filemtime($resource) >= $exp_time) {
return @unlink($resource);
}
}
else {
return @unlink($resource);
}
}