Java File Name Get getFilename(String filePath)

Here you can find the source of getFilename(String filePath)

Description

get Filename

License

Open Source License

Parameter

Parameter Description
filePath a parameter

Declaration

public static String getFilename(String filePath) 

Method Source Code


//package com.java2s;
import java.io.File;

public class Main {
    /**/*from   w  w w.ja v  a  2  s .  c o m*/
     * @param filePath
     */
    public static String getFilename(String filePath) {
        File f = new File(filePath);
        return f.getName();
    }
}

Related

  1. getFileName(String filePath)
  2. getFileName(String filepath)
  3. getFileName(String filePath)
  4. getFileName(String filePath)
  5. getFileName(String filePath)
  6. getFileName(String folder, final String path)
  7. getFilename(String fullFilename)
  8. getFileName(String localRootDirName, String ending)
  9. getFileName(String name)