Here you can find the source of getRootName(File f)
public static String getRootName(File f)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static String getRootName(File f) { String fnm = f.getName(); int index = fnm.lastIndexOf("."); return fnm.substring(0, index == -1 ? fnm.length() : index); }/*from w w w .ja va 2s. co m*/ }