if (path.startsWith(rootPath)) { path = path.substring(rootPath.length());
if (path.equals(rootPath)) { path  = ""; } else if (path.startsWith(rootPath + "/")) { path = path.substring(rootPath.length() + 1);
    public static String formatPath(File file) {        String path;        String rootPath;        path = file.getAbsolutePath();        rootPath = new File("").getAbsolutePath();        path = path.replace(File.separatorChar, '/');        rootPath = rootPath.replace(File.separatorChar, '/');        if (path.startsWith(rootPath)) {            path = path.substring(rootPath.length());        }        // remove all "./"        path = condensePath(path);        path = path.replace('/', File.separatorChar);        if (path.trim().length() == 0) {            path = ".";        }        return path;    }