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

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

检测上传根目录
public checkRootPath ( string $rootpath ) : boolean
$rootpath string 根目录
Результат boolean true-检测通过,false-检测失败
    public function checkRootPath($rootpath)
    {
        $rootpath = trim($rootpath, './');
        if (!$this->domain) {
            $rootpath = explode('/', $rootpath);
            $this->domain = strtolower(array_shift($rootpath));
            $rootpath = implode('/', $rootpath);
        }
        $this->rootPath = $rootpath;
        $st = new \SaeStorage();
        if (false === $st->getDomainCapacity($this->domain)) {
            $this->error = '您好像没有建立Storage的domain[' . $this->domain . ']';
            return false;
        }
        return true;
    }