android文件操作

存贮卡存贮方式:

 

File file = new File(Environment.getExternalStorageDirectory(), fileName);

 应用程序目录:

context.getFilesDir()

 缓存目录:

context.getCacheDir()

 context上下文提供了API:

context.openFileOutput(name, mode)

 文件对外权限:

私有、可读、可写、可读写

 

你可能感兴趣的:(android)