简体   繁体   English

我在哪里可以访问 Gdx.files.local()?

[英]Where can I access Gdx.files.local()?

I have a pre-made json file that I want to test out.我有一个要测试的预制 json 文件。 This Json file will be modified so I want to read/write.这个 Json 文件将被修改,所以我想读/写。 I noticed that internal is read-only.我注意到内部是只读的。 So I want to save my Json file in the local storage(manually through eclipse or OS(windows 8)) such that I can access through files.local().所以我想将我的 Json 文件保存在本地存储中(通过 eclipse 或 OS(windows 8) 手动),以便我可以通过 files.local() 访问。 Does anyone know the address of the local storage defined by libgdx?有谁知道libgdx定义的本地存储地址? So that I can save my pre-made Json file?这样我就可以保存我预先制作的 Json 文件?

This is for testing only!这仅用于测试!
If there is a better way for me to test out my json file (read/write) please help me!如果我有更好的方法来测试我的 json 文件(读/写),请帮助我!

Thank you!谢谢!

It depends on the backend or plattform.这取决于后端或平台。 This link should help, under the point File (Storage) Types you can see where they are stored on the different plattforms.链接应该会有所帮助,在File (Storage) Types点下,您可以看到它们在不同平台上的存储位置。
Also you can query the root path by using Gdx.files.getLocalStoragePath();您也可以使用Gdx.files.getLocalStoragePath();查询根路径Gdx.files.getLocalStoragePath();

Hope it helps.希望能帮助到你。

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

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