The filepath of the repository root directory.

This directory is expected to contain the composer.json that defines
acquia/blt as a dependency.

@param string $repoRoot
The filepath of the repository root directory.
977033
public function setRepoRoot($repoRoot) {
    if (!$this->fs->exists($repoRoot)) {
      throw new FileNotFoundException();
    }

    $this->repoRoot = $repoRoot;
  }
968087
public function isGitDir($requireRoot = true)
    {
        $directory = $this->getGitDir();

        if ('' === $directory) {
            return false;
        }

        if ($requireRoot && str_replace('\\', '/', getcwd()) !== $directory) {
            return false;
        }

        return true;
    }
735207
public function getPath ($relativePath = false) {
		$root = $this->getRoot();

		if ($relativePath === false) {
			$relativePath = Jodit::$app->request->path ?: '';
		}

		//always check whether we are below the root category is not reached
		if (realpath($root . $relativePath) && strpos(realpath($root . $relativePath) . Consts::DS, $root) !== false) {
			$root = realpath($root . $relativePath);
			if (is_dir($root)) {
				$root .= Consts::DS;
			}
		} else {
			throw new \Exception('Path does not exist', Consts::ERROR_CODE_NOT_EXISTS);
		}

		return $root;
	}
298744
public static function makePath( $validate = true, $forceCreate = false )
    {
        $_arguments = func_get_args();
        $_validate = $_path = null;

        foreach ( $_arguments as $_part )
        {
            if ( is_bool( $_part ) )
            {
                $_validate = $_part;
                continue;
            }

            $_path .= DIRECTORY_SEPARATOR . trim( $_part, DIRECTORY_SEPARATOR . ' ' );
        }

        if ( !is_dir( $_path = realpath( $_path ) ) )
        {
            if ( $_validate && !$forceCreate )
            {
                return false;
            }

            if ( $forceCreate )
            {
                if ( false === @mkdir( $_path, 0, true ) )
                {
                    throw new UtilityException( 'The result path "' . $_path . '" could not be created.' );
                }
            }
        }

        return $_path;
    }
563221
protected function initRepo($repoPath)
    {
        $command = "git init $repoPath";
        $this->info("Run \"$command\".");

        $output = [];
        exec($command, $output, $returnStatusCode);

        if ($returnStatusCode !== 0) {
            throw RuntimeException::commandExecutionFailed(
                $command, $returnStatusCode
            );
        }

        $this->info("\"$command\" was successfully ran.");
    }
651141
public static function getRootDir($bundlepath = false)
    {
        $dir = dirname(static::getCont()->getParameter('kernel.root_dir'));

        if ($bundlepath) {
            $n = get_called_class();
            $n = substr($n, 0, -strlen(strrchr($n, '\\')));
            $n = substr($n, 0, -strlen(strrchr($n, '\\')));
            $n = str_replace('\\', '/', $n);
            $dir .= "/src/$n";
        }

        return $dir;
    }
812042
protected function prependRepositories(RootPackageInterface $root)
    {
        if (!isset($this->json['repositories'])) {
            return;
        }
        $repoManager = $this->composer->getRepositoryManager();
        $newRepos = array();

        foreach ($this->json['repositories'] as $repoJson) {
            if (!isset($repoJson['type'])) {
                continue;
            }
            $this->logger->info("Prepending {$repoJson['type']} repository");
            $repo = $repoManager->createRepository(
                $repoJson['type'],
                $repoJson
            );
            $repoManager->prependRepository($repo);
            $newRepos[] = $repo;
        }

        $unwrapped = self::unwrapIfNeeded($root, 'setRepositories');
        $unwrapped->setRepositories(array_merge(
            $newRepos,
            $root->getRepositories()
        ));
    }
202932
public function findIn($projectRoot)
    {
        $files = $this->fileRepository->findPhp($projectRoot);
        $fqcnCollection = new FqcnCollection();
        $allParser = $this->parserFactory->makeAll($fqcnCollection);
        foreach ($files as $file) {
            $content = $file->getContent();
            $allParser->parse($content);
        }

        return $fqcnCollection->all();
    }
478694
function findRoot() {

  let rootPath;

  try {
    rootPath = glob.sync('../**/Drupal.php', {ignore: ['../vendor/**', '../node_modules/**']});
  } catch (err) {
    throw new Error('No Drupal root found.');
  }

  // If we found no results for Drupal.php..then bomb out.
  if (rootPath.length === 0) {
    throw new Error('No Drupal root found.');
  }

  // Glob returns an array, even though we've only got one item.
  rootPath = rootPath[0];

  const filePathParts = rootPath.split(path.sep);
  const coreDirPosition = filePathParts.indexOf('core');

  // If we found a Drupal.php file, but no core directory..then bomb out.
  if (coreDirPosition === -1) {
    throw new Error('No Drupal root found.');
  }

  return filePathParts.slice(0, coreDirPosition).join(path.sep);

}
1267413
public function getRepository($path)
    {
        if (!file_exists($path) || !file_exists($path . '/.git/HEAD') && !file_exists($path . '/HEAD')) {
            throw new \RuntimeException('There is no GIT repository at ' . $path);
        }

        return new Repository($path, $this);
    }
1285188
public function get_rootpath() {
        global $CFG;
        $subdir = clean_param(trim($this->subdir, '/'), PARAM_PATH);
        $path = $CFG->dataroot . '/repository/' . $this->subdir . '/';
        if ((empty($this->subdir) && !is_numeric($this->subdir)) || $subdir != $this->subdir || !is_dir($path)) {
            throw new repository_exception('The instance is not properly configured, invalid path.');
        }
        return $path;
    }
39268
protected function setDocumentRoot(FilePathInterface $documentRoot): void
    {
        if (!$documentRoot->isDirectory()) {
            throw new InvalidFilePathException('Document root "' . $documentRoot . '" is not a directory.');
        }

        if (!$documentRoot->isAbsolute()) {
            throw new InvalidFilePathException('Document root "' . $documentRoot . '" is not an absolute path.');
        }

        $this->documentRoot = $documentRoot;
    }
345134
public function setDocRoot($docRoot)
    {
        if (empty($docRoot) || ! file_exists($docRoot) || ! is_dir($docRoot)) {
            throw new \InvalidArgumentException(
                'The document root set is not a valid directory.'
            );
        }
        $this->docRoot = rtrim($docRoot, '/');
    }
1176993
protected function pathForFile($fileOrUrl)
    {
        // Since combined urls could be root relative, treat them as urls here.
        if (preg_match('{^(//)|(http[s]?:)}', $fileOrUrl) || Director::is_root_relative_url($fileOrUrl)) {
            return $fileOrUrl;
        } else {
            return Injector::inst()->get(ResourceURLGenerator::class)->urlForResource($fileOrUrl);
        }
    }
933213
protected function addThemeRepositoryToRootComposer()
    {
        $composer = json_decode(file_get_contents(base_path('composer.json')), true);

        $composer['repositories'][] = [
            'type' => 'path',
            'url' => './'.$this->relativeThemePath(),
        ];

        file_put_contents(
            base_path('composer.json'),
            json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
        );
    }
1345788
public function setRepositoryPath($repository_path, $createNew = false, $_init = true)
    {
        if (is_string($repository_path)) {
            if ($new_path = realpath($repository_path)) {
                $repository_path = $new_path;
                if (is_dir($repository_path)) {
                    if (file_exists($repository_path."/.git") && is_dir($repository_path."/.git")) {
                        $this->repository_path = $repository_path;
                    } else {
                        if ($createNew) {
                            $this->repository_path = $repository_path;
                            if ($_init) {
                                $this->run('init');
                            }
                        } else {
                            throw new \Exception(
                                sprintf('"%s" is not a git repository!', $repository_path)
                            );
                        }
                    }
                } else {
                    throw new \Exception(
                        sprintf('"%s" is not a directory', $repository_path)
                    );
                }
            } else {
                if ($createNew) {
                    if ($parent = realpath(dirname($repository_path))) {
                        mkdir($repository_path);
                        $this->repository_path = $repository_path;
                        if ($_init) {
                            $this->run('init');
                        }
                    } else {
                        throw new \Exception('Cannot create repository in non-existent directory');
                    }
                } else {
                    throw new \Exception(
                        sprintf('"%s" does not exist', $repository_path)
                    );
                }
            }
        }
    }
346122
public function install(\Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $package) {
		parent::install($repo, $package);
		
		$this->removeResources($package);
		$this->installResources($package);
		
	}