Java tutorial
//package com.java2s; import java.io.File; public class Main { /** * simply get binary repository's root according to source repository's root. * won't do any check. * * @param sourceRepoDir * @return */ public static File getBinaryRepositoryRoot(File sourceRepoDir) { // repository foldername String repositoryFolderName = sourceRepoDir.getName(); // go to parent directory File parent = sourceRepoDir.getParentFile(); return new File(parent, ("." + repositoryFolderName)); } }