我使用下面的代码创建的文件在Android中物理存储?
OutputStreamWriter out = new OutputStreamWriter(openFileOutput("try.txt",0));
// write the contents on mySettings to the file
out.write("erterter");
// close the file
out.close();
我使用下面的代码创建的文件在Android中物理存储?
OutputStreamWriter out = new OutputStreamWriter(openFileOutput("try.txt",0));
// write the contents on mySettings to the file
out.write("erterter");
// close the file
out.close();
文件中这种方式创建创建的文件都存储在您的应用程序的专用存储:/data/data/com.package/files
请帮我不能在我的应用程序的文件夹结构中找到这样的位置 – 2012-07-23 15:06:27
@MhhirBhatt该目录是隐藏的,除非您的设备是植根的。如果您已经从市场上下载[Root Explorer](https://play.google.com/store/apps/details?id=com.speedsoftware.rootexplorer&hl=en)以查找此目录。 – FoamyGuy 2012-07-23 15:13:09
如果您没有植入或使用模拟器,您将无法访问该位置,除非在您的应用程序内。在模拟器上,您可以使用DDMS FileExplorer选项卡来访问它。如果您已经扎根,则可以使用计算机上的adb shell,或者如@Tim所示,在设备上使用启用了root的文件浏览器。注意:'com.package'显然应该替换为你自己的包。 – 2012-07-23 15:16:10
@Tim我现在看到,删除了我的错误的意见,然后 – 2012-07-23 16:15:50