refactor and add more linux extensions and libraries

This commit is contained in:
crazywhalecc
2023-03-26 22:27:51 +08:00
parent 17e0265ed0
commit 84b1732683
38 changed files with 1059 additions and 360 deletions

View File

@@ -378,4 +378,11 @@ class FileSystem
}
return $ret === 0;
}
public static function createDir(string $path): void
{
if (!is_dir($path) && !mkdir($path, 0755, true) && !is_dir($path)) {
throw new FileSystemException(sprintf('无法建立目录:%s', $path));
}
}
}