简体   繁体   English

文件在eclipse项目文件夹中的哪里存储在外部存储中?

[英]Where in the eclipse project folder are files stored in External Storage?

I'm trying to implement a set of methods that read from and write to text files in External Storage in android (18, 4.3.1). 我正在尝试实现一组在android(18,4.3.1)中读取和写入文本文件的方法。 I normally use AssetManager, but that's read only. 我通常使用AssetManager,但这是只读的。

I want to initialize these files with values, but I don't know where the External Storage directory is in the Eclipse project folder. 我想用值初始化这些文件,但是我不知道外部存储目录在Eclipse项目文件夹中的位置。 The method I'm using to get the path is the following: 我用来获取路径的方法如下:

        File sdCard = Environment.getExternalStorageDirectory();
        File file = new File(sdCard, "passwords.txt");

        ...

Edit: This may have been written confusingly. 编辑:这可能已经被混淆了。 I want to know where to put my text file in my eclipse project so that the Android Virtual Device loads it into External Storage, and I can find that path. 我想知道将文本文件放在eclipse项目中的位置,以便Android虚拟设备将其加载到外部存储中,并且可以找到该路径。

if u want to see your stored file. 如果您想查看您的存储文件。 you can see these file into Your device. 您可以在您的设备中看到这些文件。 if You want to initialize the file object then You need to provide the absolute path of the file which is in your device. 如果要初始化文件对象,则需要提供设备中文件的绝对路径。 it is not related with eclipse 它与日食无关

if u want to know the absolute path. 如果你想知道绝对路径。 go to file file manager in our device and check those file there. 转到我们设备中的文件文件管理器,然后在此处检查那些文件。 all the file Which You Stored into the external storage, available in that directory 您存储到外部存储中的所有文件,在该目录中可用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM