mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
15
library/think/cache/driver/File.php
vendored
15
library/think/cache/driver/File.php
vendored
@@ -186,18 +186,11 @@ class File
|
|||||||
*/
|
*/
|
||||||
public function clear()
|
public function clear()
|
||||||
{
|
{
|
||||||
$path = $this->options['path'];
|
$fileLsit = (array)glob($this->options['path'].'*');
|
||||||
if ($dir = opendir($path)) {
|
foreach ($fileLsit as $path) {
|
||||||
while ($file = readdir($dir)) {
|
is_file($path) && unlink($path);
|
||||||
$check = is_dir($file);
|
|
||||||
if (!$check) {
|
|
||||||
$this->unlink($path . $file);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
closedir($dir);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user