lots
This commit is contained in:
@@ -14,7 +14,7 @@ class StaticGenerator
|
||||
$filepath = public_path($path . "/index.html");
|
||||
|
||||
if (!file_exists(pathinfo($filepath, PATHINFO_DIRNAME))) {
|
||||
$this->make_dir(pathinfo($filepath, PATHINFO_DIRNAME));
|
||||
make_dir_r(pathinfo($filepath, PATHINFO_DIRNAME));
|
||||
}
|
||||
|
||||
file_put_contents($filepath, $html);
|
||||
@@ -35,8 +35,5 @@ class StaticGenerator
|
||||
return 0;
|
||||
}
|
||||
|
||||
private function make_dir(string $path): void
|
||||
{
|
||||
is_dir($path) || mkdir($path, 0777, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user