Java File Name Get getFilename(String path)

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

Description

get Filename

License

Open Source License

Declaration

public static String getFilename(String path) 

Method Source Code


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

public class Main {
    public static String getFilename(String path) {
        int pos = path.lastIndexOf(File.separator);
        return path.substring(pos + 1, path.length());
    }//  w  w  w. j a va  2 s .c o m
}

Related

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