org\upload\driver\Local::mkdir PHP Method

mkdir() public method

创建目录
public mkdir ( string $savepath ) : boolean
$savepath string 要创建的目录
return boolean 创建状态,true-成功,false-失败
    public function mkdir($savepath)
    {
        $dir = $this->rootPath . $savepath;
        if (is_dir($dir)) {
            return true;
        }
        if (mkdir($dir, 0777, true)) {
            return true;
        } else {
            $this->error = "目录 {$savepath} 创建失败!";
            return false;
        }
    }