Java Root Path Get getRootName(String fnm)

Here you can find the source of getRootName(String fnm)

Description

get Root Name

License

Open Source License

Declaration

public static String getRootName(String fnm) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    public static String getRootName(File f) {
        String fnm = f.getName();
        return getRootName(fnm);
    }//ww w  . java 2 s.c o m

    public static String getRootName(String fnm) {
        int ild = fnm.lastIndexOf(".");

        String root = fnm;
        if (ild > 0) {
            root = fnm.substring(0, fnm.lastIndexOf("."));
        }
        return root;
    }
}

Related

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