Set the install directory.

@param string $dir
@return bool
11930
public function setInstallDir($dir)
    {
        $dir = $this->addTrailingSlash($dir);

        if (!is_dir($dir)) {
            $this->log->addDebug(sprintf('Creating new install directory "%s"', $dir));

            if (!mkdir($dir, 0755, true)) {
                $this->log->addCritical(sprintf('Could not create install directory "%s"', $dir));

                return false;
            }
        }

        $this->installDir = $dir;

        return true;
    }
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");
        }
    }
1178504
public static function setBinDirectory($dir)
    {
        $real_path = realpath($dir);

        if ($real_path) {
            $real_path = H::parseDirName($real_path);
            self::set(C::BIN_DIR, $real_path);

            return $real_path;
        }
        elseif ($dir == C::DFT) {
            return self::setBinDirectory(self::getBinDirectory());
        }
        throw new PopplerPhpException("Poppler bin directory does not exist: ".$dir);
    }
397585
static public function
	MakeDirectory($dir) {
	/*//
	@argv string Directory
	@return bool

	make a directory. returns if successful or not. allows you to
	blindly call it if it already exists to ensure it exists.
	//*/

		// if it already exists...
		if(is_dir($dir)) return true;

		// make it...
		$umask = umask(0);
		@mkdir($dir,0777,true);
		umask($umask);

		// find out if it was successful, lol.
		return is_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);
    }
922588
public function setDir($dir)
    {
        if (in_array($dir, Direction::asArray(), true) === true) {
            $this->dir = $dir;
        } else {
            $msg = "The 'dir' argument must be a value from the Direction enumeration.";
            throw new InvalidArgumentException($msg);
        }
    }
226077
protected final static function readyDir($dir) {
		if(is_file($dir))
			return false;
		
		if (!is_dir(dirname($dir)))
			return mkdir(dirname($dir), 0777, true);
		
		return true;
	}
713731
public function setDirectory($dir)
    {
        if(!is_dir($dir) && !mkdir($dir, 0775, true)) {
            throw new \Dropbox\Exception('Unable to create directory ' . $dir);
        } else {
            $this->tokenDirectory = $dir;
        }
    }
118744
public function setCacheDir($dir)
    {
        if (GenericValidator::validateDirName($dir)) {
            $this->cacheDir = $dir;
            FileSystemHelper::setUpDir($dir);
            return true;
        }
        return false;
    }
451561
private function checkDir($dir)
    {
        if (! $this->fs->exists($dir)) {
            $this->fs->mkdir($dir);
        }
    }
1016024
protected function ensure_dir_exists( $dir ) {
		if ( ! is_dir( $dir ) ) {
			// Disable the cache if a null device like /dev/null is being used.
			if ( preg_match( '{(^|[\\\\/])(\$null|nul|NUL|/dev/null)([\\\\/]|$)}', $dir ) ) {
				return false;
			}

			if ( ! @mkdir( $dir, 0777, true ) ) {
				$error = error_get_last();
				\WP_CLI::warning( sprintf( "Failed to create directory '%s': %s.", $dir, $error['message'] ) );
				return false;
			}
		}

		return true;
	}
408599
public function setSeedsDir($dir)
    {
        $this->seeds_dir = (string)$dir;
        if (!empty($this->seeds_dir)) {
            $this->seedCacheOptions[\xPDO::OPT_CACHE_PATH] = $this->blender->getSeedsPath().$dir.'/';
            $this->historyCacheOptions[\xPDO::OPT_CACHE_PATH] = $this->blender->getHistoryPath().$dir.'/';
        }
        return $this;
    }
661666
public static function makeDir($dir) {
		$fs = new Filesystem();
		try {
			$fs->mkdir($dir);
		} catch (IOExceptionInterface $e) {
			Console::writeError("an error occurred while creating your directory at <path>".$e->getPath()."</path>...");
		}
		unset($fs);
	}
1185896
protected function _clearDir($dir) {

        $dirPath = $this->Dir->pwd() . $dir;

        if ( ! $this->isExistFolder($dir) ) {
            $this->err("Error : directory {$dir} not exist");
            return false;
        }

        if ( ! $this->Dir->delete($dirPath) ) {
            $this->err("Error : delete directory {$dir} failed");
            $this->verbose($this->Dir->errors());
            return false;
        }

        if ( ! $this->Dir->create($dirPath, 0777) ) {
            $this->err("Error : recreate directory {$dir} failed");
            $this->verbose($this->Dir->errors());
            return false;
        }

        return true;
    }
1151536
public function setProxyDir(string $dir) : void
    {
        $this->getProxyManagerConfiguration()->setProxiesTargetDir($dir);

        // Recreate proxy generator to ensure its path was updated
        if ($this->autoGenerateProxyClasses !== self::AUTOGENERATE_FILE_NOT_EXISTS) {
            return;
        }

        $this->setAutoGenerateProxyClasses($this->autoGenerateProxyClasses);
    }
1026588
protected function dirExists($dir)
    {
        if ($this->files->exists($dir)) {

            if ( ! $this->files->isDirectory($dir)) {
                throw new RuntimeException("The given directory [$dir] is not a directory.");
            }

            return true;
        }

        return false;
    }
723812
public function mkdir($dir)
    {
        return ($this->isConnected() === true) ? ftp_mkdir($this->getConnection(), $dir) : false;
    }