Accessing the /cache directory in the Android filesystem

lorenzoff picture lorenzoff · Jan 9, 2012 · Viewed 24k times · Source

How can I write a file in the /cache directory? I continue to get a FileNotFoundException (Permission denied).

Someone told me about the android.permission.ACCESS_CACHE_FILESYSTEM but i can't find it in the Android reference.

Any help will be appreciated.

EDIT: i'm using level 13 apis

Answer

clemp6r picture clemp6r · Jan 9, 2012

You can only write to the cache directory of your own application: use context.getCacheDir() to get its location.