Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Getting hold of real directory names — Gideros Forum

Getting hold of real directory names

bowerandybowerandy Guru
edited May 2012 in General questions
I know I've read somewhere that you didn't want to allow access to to the real names of the |D| and |R| directories because at some point Gideros might run on systems without even a file system but...

If one is writing a plugin it is very difficult to manipulate filenames passed down from Lua if one doesn't know where they really are. Can you recommend a way of finding the real pathnames for files in |D| and |R|? The problem is made even trickier because the Player has a different folder structure than that on a real device.

If there isn't currently a way to do this and you really don't want to give us access to the real pathnames up in Lua could you possibly supply a function we can call down in plug-in code to be able to get hold of these names?

Best regards

Comments

  • atilimatilim Maintainer
    edited May 2012
    Hi,

    There is already a function to be used with plugins to get the real path:
    const char *g_pathForFile(const char *filename);
    You can directly use it.

    For example,
    const char *path = g_pathForFile("|D|test.txt")
    returns the full absolute path of test.txt at documents directory.
Sign In or Register to comment.