org\upload\driver\Local::checkRootPath PHP Метод

checkRootPath() публичный Метод

检测上传根目录
public checkRootPath ( string $rootpath ) : boolean
$rootpath string 根目录
Результат boolean true-检测通过,false-检测失败
    public function checkRootPath($rootpath)
    {
        if (!(is_dir($rootpath) && is_writable($rootpath))) {
            $this->error = '上传根目录不存在!请尝试手动创建:' . $rootpath;
            return false;
        }
        $this->rootPath = $rootpath;
        return true;
    }