Java Root Path Get getRootName(File f)

Here you can find the source of getRootName(File f)

Description

get Root Name

License

Open Source License

Declaration

public static String getRootName(File f) 

Method Source Code


//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*/
}

Related

  1. getRootFloorPlansDir()
  2. getRootFolder(final File file, final String headerFileName)
  3. getRootFolderPath(File file)
  4. getRootName(String fnm)
  5. getRootName(String pathname)
  6. getRootPath()
  7. getRootPath()