FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_WORLD_READABLE);
fos.write(string.getBytes());
fos.close();
Run Code Online (Sandbox Code Playgroud)
当试图删除其中一个文件时,这就是我使用的,但它返回false.
String tag = v.getTag().toString();
File file = new File(System.getProperty("user.dir")+"/"+tag);
String s = new Boolean (file.exists()).toString();
Toast.makeText(getApplicationContext(), s, 1500).show();
file.delete();
Run Code Online (Sandbox Code Playgroud)
我怎样才能克服这个问题?