Android 笔记 ------当你获得文件路劲时获取此文件的信息

* "文件名称:" + f.getName()
* "文件是否存在:" + f.exists()
* "文件的相对路径:" + f.getPath()
* "文件的绝对路径:" + f.getAbsolutePath()
* "文件可以读取:" + f.canRead()
* "文件可以写入:" + f.canWrite()
* "文件上级路径:" + f.getParent()
* "文件大小:" + f.length()
* "文件最后修改时间:" + new Date(f.lastModified())
* "是否是文件类型:" + f.isFile());
* "是否是文件夹类型:" + f.isDirectory()
* "文件大小:" + fis.available()

原文地址:https://www.cnblogs.com/sfysuper/p/8408975.html