在哪里可以访问Gdx.files.local()? [英] Where can I access Gdx.files.local()?

查看:102
本文介绍了在哪里可以访问Gdx.files.local()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要测试的预制json文件. 这个Json文件将被修改,所以我想读/写. 我注意到内部是只读的.所以我想将Json文件保存在本地存储中(手动通过eclipse或OS(windows 8)),以便可以通过files.local()访问.有人知道libgdx定义的本地存储的地址吗?这样我就可以保存我的预制Json文件?

I have a pre-made json file that I want to test out. This Json file will be modified so I want to read/write. 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(). Does anyone know the address of the local storage defined by 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!

谢谢!

推荐答案

这取决于后端或平台.此链接应该会有所帮助,在 File (Storage) Types点下,您可以看到它们的位置存储在不同的平台上.
您也可以使用Gdx.files.getLocalStoragePath();

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.
Also you can query the root path by using Gdx.files.getLocalStoragePath();

希望有帮助.

这篇关于在哪里可以访问Gdx.files.local()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆