Set Authencation Directory.

@param string $dir Directory
496975
public function setAuthDir($dir)
    {
        if (!file_exists($dir)) {
            throw new \Exception('Auth directory is not exists!');
        }

        if (!is_dir($dir)) {
            throw new \Exception('Auth directory is not exists!');
        }

        if ($this->security && $this->security->getKey()) {
            throw new \Exception('Auth directory must be set before key sets!');
        }

        $this->authDir = $dir;
        $this->security->setPath($dir);
    }
511597
public function CreateProjectDirectory($dir) {
		$filepath = "{$this->ProjectRoot}/{$dir}";

		if(!file_exists($filepath)) @mkdir($filepath,0777,true);
		if(!file_exists($filepath)) throw new Exception("unable to create {$dir}");

		return $this;
	}
182570
public function setDataDirectory(string $directory)
    {
        $directory = rtrim(str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $directory), DIRECTORY_SEPARATOR);

        // Check main data directory
        $this->checkDirectory($directory, false);

        // Check/create sub directory
        $directory = $directory . DIRECTORY_SEPARATOR . self::SUB_DIRECTORY;
        $this->checkDirectory($directory, true);

        $this->dataDirectory = $directory;
    }
260602
public function SetCacheDir( $dir ){

		if( !file_exists($dir) ){
			if( mkdir($dir) ){
				return true;
			}
			throw new Less_Exception_Parser('Less.php cache directory couldn\'t be created: '.$dir);

		}elseif( !is_dir($dir) ){
			throw new Less_Exception_Parser('Less.php cache directory doesn\'t exist: '.$dir);

		}elseif( !is_writable($dir) ){
			throw new Less_Exception_Parser('Less.php cache directory isn\'t writable: '.$dir);

		}else{
			$dir = self::WinPath($dir);
			Less_Cache::$cache_dir = rtrim($dir,'/').'/';
			return true;
		}
	}
92647
protected function _createDirectory($dir)
    {
        $old = umask(0);
        // @codingStandardsIgnoreStart
        $result = @mkdir($dir, 0755, true);
        // @codingStandardsIgnoreEnd
        umask($old);

        if ($result) {
            $this->out('Created directory ' . $dir);

            return true;
        }

        $this->err('Failed creating directory ' . $dir);

        return false;
    }
1029017
protected function mkDir($dir)
    {
        if (!file_exists($dir)) {
            mkdir($dir, self::DIR_MODE, true);
            chmod($dir, self::DIR_MODE);
        }
        if (!is_dir($dir)) {
            throw new \Exception("Failed to create directory: $dir");
        }
    }
593919
public function rmdir($dir) {
		$this->connectIfNeeded();
		$this->handle->rmdir($dir);
		$this->onFolderDeleted(new Event(['sender' => $this, 'data' => $dir]));
	}
1308391
protected function addDir($dir)
    {
        // Add any additional directories to the top of the array
        // so that the user can override art
        array_unshift($this->art_dirs, rtrim($dir, '/'));

        // Keep the array clean
        $this->art_dirs = array_unique($this->art_dirs);
        $this->art_dirs = array_filter($this->art_dirs);
        $this->art_dirs = array_values($this->art_dirs);
    }
451561
private function checkDir($dir)
    {
        if (! $this->fs->exists($dir)) {
            $this->fs->mkdir($dir);
        }
    }
617331
public function setUploadDir($dir)
    {
        // Check to see if the upload directory exists.
        if (!file_exists($dir) || !is_dir($dir)) {
            $this->error = self::UPLOAD_ERR_DIR_NOT_EXIST;
        // Check to see if the permissions are set correctly.
        } else if (!is_writable($dir)) {
            $this->error = self::UPLOAD_ERR_DIR_NOT_WRITABLE;
        }

        $this->uploadDir = $dir;
        return $this;
    }
142285
public function setLogDirectory($dir)
    {
        if ($dir && file_exists($dir) && is_dir($dir)) {
            $this->logDir = $dir;
        } elseif (null === $dir) {
            $this->logDir = null;
        }
    }
790066
public void setDir(java.lang.String dir) {
        getStateHelper().put(PropertyKeys.dir, dir);
        handleAttribute("dir", dir);
    }
646580
private function rmdir($dir)
    {
        // remove all files
        $files = scandir($dir);
        foreach ($files as $file) {
            if ($file == '.' || $file == '..') {
                continue;
            }

            $path = $dir . '/' . $file;
            if (is_dir($path)) {
                $this->rmdir($path);
            } elseif (is_file($path)) {
                unlink($path);
            }
        }

        rmdir($dir);
    }
76260
public function addHelperDir($dir)
    {
        if (true === file_exists($dir) && true === is_dir($dir)) {
            $this->getApplication()->getAutoloader()->registerNamespace('BackBee\Renderer\Helper', $dir);
        }

        return $this;
    }
695423
public function setDir($dir)
    {
        if (empty($dir) || !@is_dir($dir)) {
            throw new PageCacheException(__METHOD__ . ': ' . (string)$dir . ' in constructor is not a directory');
        }

        // Check for trailing slash and add it if not exists
        if (mb_substr($dir, -1, 1) !== DIRECTORY_SEPARATOR) {
            $dir .= DIRECTORY_SEPARATOR;
        }

        $this->dir = $dir;
    }
515668
public function setRoot($dir)
    {
        if (!is_dir($dir)) {
            throw new Exception(sprintf('Not found directory: %s', $dir));
        }

        $this->root = $this->cleanPath($dir);
    }
355203
public function rmdirr($dir)
    {
        if ($handle = opendir("$dir")) {
            while ($item = readdir($handle)) {
                if (($item != ".") && ($item != "..")) {
                    if (is_dir("$dir/$item")) {
                        $this->rmdirr("$dir/$item");
                    } else {
                        unlink("$dir/$item");
                    }
                }
            }
            closedir($handle);
            rmdir($dir);
        }
    }