feat(Logator): add delete and reset
This commit is contained in:
parent
b0185a9ac0
commit
df5630a701
2 changed files with 32 additions and 2 deletions
|
|
@ -54,3 +54,12 @@ function getDirsAsArray($path) {
|
|||
}, $dirs);
|
||||
return array_values($dirs);
|
||||
}
|
||||
|
||||
function deleteAllFiles($path) {
|
||||
$count = 0;
|
||||
foreach (getFilesAsArray($path) as $file) {
|
||||
unlink($path . '/' . $file);
|
||||
$count++;
|
||||
}
|
||||
return $count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue