Android: How to get a file's creation date?

android

Solution

The file creation date is not an available, but you can get the last-modified date:

File file = new File(filePath);
Date lastModDate = new Date(file.lastModified());

System.out.println("File last modified @ : "+ lastModDate.toString());

Problem

This is my code: ``` File TempFiles = new File(Tempfilepath); if (TempFiles.exists()) { String[] child = TempFiles.list(); for (int i = 0; i < child.length; i++) { Log.i("File: " + child[i] + " creation date ?"); // how to get file creation date..? } } ```

Original source

Related problems