private void initialize() throws IOException {

		log.info("Known Repositories:");
		String[] names = getRepositoryNames(rootDirFile);
		for (String name : names) {
			log.info("   " + name);
		}
		if (names.length == 0) {
			log.info("   <none>");
		}
		for (String name : names) {
			File f = new File(rootDirFile, NamingUtilities.mangle(name));
			if (!f.isDirectory()) {
				log.error("Error while processing repository " + name +
					", directory not found: " + f);
				continue;
			}
			if (!f.canWrite()) {
				throw new IOException(f.getAbsolutePath() + " can not be written to");
			}
			try {
				Repository rep = new Repository(this, null, f, name);
				repositoryMap.put(name, rep);
			}
			catch (UserAccessException e) {
				// ignore
			}
			catch (Exception e) {
				log.error("Error while processing repository " + name + ", " + e.getMessage());
				continue;
			}
		}

		// Start command queue watcher
		commandWatcher = new CommandWatcher(this);
		Thread t = new Thread(commandWatcher, "Server Command Watcher");
		t.start();

		processCommandQueue(); // process any old commands
	}
Scan for existing repositories and build repositoryMap.
@throws IOException if error occurs accessing or writing to server storage directory
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/RepositoryManager.java