Environment中涉及到外部存储路径…
来源:互联网 发布:万方数据库论文检索 编辑:程序博客网 时间:2024/06/05 00:22
Environment中涉及到外部存储路径和储存大小API(测试机:魅族MX2,用其他测试机测试结果会有不同):
System.out.println("getExternalStorageDirectory.getAbsolutePath===="+Environment.getExternalStorageDirectory().getAbsolutePath());///mnt/sdcard
System.out.println("getExternalStorageDirectory.getPath===="+Environment.getExternalStorageDirectory().getPath());// /mnt/sdcard
System.out.println("getExternalStorageDirectory.getName===="+Environment.getExternalStorageDirectory().getName());// sdcard
System.out.println("getExternalStorageDirectory.getParent===="+Environment.getExternalStorageDirectory().getParent());///mnt
System.out.println("getExternalStorageDirectory.getFreeSpace===="+Environment.getExternalStorageDirectory().getFreeSpace());//12124454912
System.out.println("getExternalStorageDirectory.getTotalSpace===="+Environment.getExternalStorageDirectory().getTotalSpace());//12624855040
System.out.println("getExternalStorageDirectory.getUsableSpace===="+Environment.getExternalStorageDirectory().getUsableSpace());//12124454912
System.out.println("getExternalStorageState===="+Environment.getExternalStorageState());//mounted
System.out.println("getDataDirectory.getAbsolutePath===="+Environment.getDataDirectory().getAbsolutePath());// /data
System.out.println("getDataDirectory.getPath===="+Environment.getDataDirectory().getPath());// /data
System.out.println("getDataDirectory.getName===="+Environment.getDataDirectory().getName());// data
System.out.println("getDataDirectory.getParent===="+Environment.getDataDirectory().getParent());// /
System.out.println("getDataDirectory.getFreeSpace===="+Environment.getDataDirectory().getFreeSpace());//1912451072
System.out.println("getDataDirectory.getTotalSpace===="+Environment.getDataDirectory().getTotalSpace());//2113748992
System.out.println("getDataDirectory.getUsableSpace===="+Environment.getDataDirectory().getUsableSpace());//1912451072
System.out.println("getDownloadCacheDirectory.getAbsolutePath===="+Environment.getDownloadCacheDirectory().getAbsolutePath());///cache
System.out.println("getDownloadCacheDirectory.getPath===="+Environment.getDownloadCacheDirectory().getPath());///cache
System.out.println("getDownloadCacheDirectory.getName===="+Environment.getDownloadCacheDirectory().getName());// cache
System.out.println("getDownloadCacheDirectory.getParent===="+Environment.getDownloadCacheDirectory().getParent());///
System.out.println("getDownloadCacheDirectory.getFreeSpace===="+Environment.getDownloadCacheDirectory().getFreeSpace());//201908224
System.out.println("getDownloadCacheDirectory.getTotalSpace===="+Environment.getDownloadCacheDirectory().getTotalSpace());//206405632
System.out.println("getDownloadCacheDirectory.getUsableSpace===="+Environment.getDownloadCacheDirectory().getUsableSpace());//201908224
注意:涉及到大小的API sdk必须到大于9!
阅读全文
0 0
- Environment中涉及到外部存储路径…
- Android获取手机外部存储路径的方法Environment.getExternalStorageDirectory()到底是什么路径
- 获取外部sdcard存储路径
- android获得内部存储/外部存储路径
- 读取外部存储的文件数据Environment.getExternalStorageDirectory()
- Android获取外部存储卡绝对路径问题Environment.getExternalStorageDirectory()
- 【Qt开发】qt中涉及到空格包含路径的解决办法
- android 获取外部存储设备路径
- android--关于内部存储、外部存储以及存储路径
- 写存储过程中涉及到一些游标的问题
- Android Environment.getExternalStorageDirectory() 获取的是内部存储还是外部存储?
- Android Environment.getExternalStorageDirectory() 获取的是内部存储还是外部存储?
- Android Environment.getExternalStorageDirectory() 获取的是内部存储还是外部存储?
- Android Environment.getExternalStorageDirectory() 获取的是内部存储还是外部存储?
- android获取外部存储和内部存储路径
- 使用API获取内部存储文件的路径;外部存储
- Android外部存储/内部存储路径获取大全
- Android外部存储/内部存储路径获取大全
- 清除浮动都有哪些方法 clear float
- JAVA中的单实例
- python写算法题:leetcode: 26. Remove Duplicates from Sorted Array
- Java中的泛型
- 读取手机外部存储空间大小
- Environment中涉及到外部存储路径…
- C语言网络知识:套接字库函数(容…
- MAKEWORD(a,b)函数
- #pragma comment宏的使用
- 协同开发中SVN的使用规范
- 如何安装SQL Server 200…
- JSP+servlet生成图表
- 分类模型的评估方法-精确率(Precision)
- Android_高德地图实现定位模板代码