public synchronized Repository createRepository(String currentUser, String name)
			throws IOException, DuplicateFileException {

		if (isAnonymousUser(currentUser)) {
			throw new UserAccessException("Anonymous user not permitted to create repository");
		}

		validateUser(currentUser);

		if (!NamingUtilities.isValidProjectName(name)) {
			throw new IOException("Invalid repository name: " + name);
		}
		if (repositoryMap.containsKey(name)) {
			throw new DuplicateFileException("Repository named " + name + " already exists");
		}

		File f = new File(rootDirFile, NamingUtilities.mangle(name));
		if (!f.mkdir()) {
			throw new IOException("Failed to make directory for " + f.getAbsolutePath());
		}

		Repository rep = new Repository(this, currentUser, f, name);
		log(name, null, "repository created", currentUser);
		repositoryMap.put(name, rep);
		return rep;
	}
Create a new Repository.
@param currentUser user creating the repository
@param name name of the repository
@return a new Repository
@throws DuplicateFileException if another repository exists with the
given name
@throws UserAccessException if the user does not exist in
the list of known users for this manager
@throws IOException if there was an error creating the repository
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/RepositoryManager.java