Android File Name Get getFileName()

Here you can find the source of getFileName()

Description

get File Name

Declaration

public static String getFileName() 

Method Source Code

//package com.java2s;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class Main {
    public static String getFileName() {
        SimpleDateFormat format = new SimpleDateFormat(
                "yyyy-MM-dd_HH-mm-ss_SS");
        String fileName = format.format(new Timestamp(System
                .currentTimeMillis()));//from w ww .jav  a 2  s .  c  om
        return fileName;
    }
}

Related

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