Java Root Path Get getRootPath()

Here you can find the source of getRootPath()

Description

get Root Path

License

Apache License

Declaration

public static String getRootPath() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {
    public static String getRootPath() {
        File file = new File(System.getProperty("user.dir"));
        String path = file.getAbsolutePath().replace('\\', '/');
        path = path.substring(0, path.indexOf('/'));
        return path;
    }//  w w w. j a  v  a2 s .co m
}

Related

  1. getRootFolder(final File file, final String headerFileName)
  2. getRootFolderPath(File file)
  3. getRootName(File f)
  4. getRootName(String fnm)
  5. getRootName(String pathname)
  6. getRootPath()
  7. getRootPath()
  8. getRootPath(String testDir)
  9. getRootPathName()