我正在尝试获取内部文件的最后修改日期,尽管我可以正确读取文件,但它总是返回 0。如果我做错了什么,请告诉我...
创建文件...
FileOutputStream Os = activity.openFileOutput("file1.jpg", Context.MODE_PRIVATE);
cachedImage.compress(CompressFormat.JPEG, 75, Os);
os.close();
正在读取文件...
长 mod_time = 0;
文件 file = new File("file1".jpg");
mod_time = file.lastModified();
FileInputStream Is = activity.openFileInput("file1.jpg");
cachedImage = BitmapFactory.decodeStream(Is);
Is.close() ;
mod_time 始终为零!!!!