Andriod文件路径探究

1.      //返回/cache---------------安卓系统目录下的cache目录,不是外部存储卡的

        String cache = Environment.getDownloadCacheDirectory().getAbsolutePath();

     //返回/system---------------------安卓系统目录下的system目录,不是外部存储卡的
      String rootPath = Environment.getRootDirectory().getAbsolutePath();

     //返回/data---------------------安卓系统目录下的data目录,不是外部存储卡的

   Environment.getDataDirectory().getAbsolutePath();

2.  Activity的 this.getCacheDir().getAbsolutePath();

   //data/data/com.example.htmlcache/cache,不是外部存储卡的

Activity的this.getFilesDir().getAbsolutePath();

//data/data/com.example.htmlcache/files,不是外部存储卡的

3.context.openFileOutput对应的目录就是//data/data/com.example.htmlcache/files


4.listFiles对象可以列出File下面的文件集合


----------未完待续

你可能感兴趣的:(Andriod文件路径探究)