Android File Name Get getFileName(String path)

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

Description

get File Name

Declaration

public static String getFileName(String path) 

Method Source Code

//package com.java2s;

public class Main {
    public static String getFileName(String path) {
        return path.substring(path.lastIndexOf("/") + 1);
    }/*  w  w  w.  j  a  v  a  2s. c om*/
}

Related

  1. getSuffix(String fileName)
  2. getNamePart(String fileName)
  3. appendNumberToFilenameIfExists(String fileName, File directory)
  4. getUniqueImageFilename(String prefix)
  5. getFileName()
  6. getFileNameFromURL(String url)
  7. getFileNameFromURL(URL url)
  8. getFileNameOnly(String filename)
  9. getFilenameFromPath(String path)