Android examples for java.io:File
get File Last Modified Date
import android.content.Context; import android.provider.Settings; import android.telephony.PhoneNumberUtils; import java.io.File; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Random; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main{ public static Date getLastModifiedDate(File file) { Date date = null;/* ww w.j ava 2 s .c om*/ Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(file.lastModified()); date = calendar.getTime(); return date; } }