我想这样做。但我得到/ system / app / filename:open failed:EROFS(只读文件系统)错误。
答案 0 :(得分:-1)
这是一个例子。请尝试
private void saveFileToInternal(String orginal_url) {
File file = new File(orginal_url);
File dir = mContext.getDir(TEMP_FOLDER, Context.MODE_PRIVATE);
File dest = new File(dir, "filename_" + file.getName());
try {
FileOutputStream out = new FileOutputStream(dest);
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
Log.e("Can not create file", e.getMessage());
}
}