Here you can find the source of isRootPath(File file)
public static boolean isRootPath(File file)
//package com.java2s; //License from project: GNU General Public License import java.io.File; public class Main { public static boolean isRootPath(File file) { return (file.getAbsoluteFile().getParentFile() == null) ? true : false; }/* w ww . j a v a 2 s.c om*/ }