addFileArchive question

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
utunnels
Posts: 37
Joined: Thu Apr 05, 2012 2:52 pm

addFileArchive question

Post by utunnels »

I used to keep my files in a folder and get the path like this:
BaseDir = FileSystem->getWorkingDirectory() + "/data"

Now I want to compress the files because I'm using dropbox and there are some ridiculously huge text files. I compressed data folder into data.zip and put it with my exe, for example, D:\irrlicht\test\test.exe and D:\irrlicht\test\data.zip

So, If I want to load a file which used to be in that data folder (ie, D:\irrlicht\test\data\character\guy1.xml), what path do I need to use?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: addFileArchive question

Post by hybrid »

You can access the data as if you changed your dir to the data/ directory that you previously had. In case you keep the directory structure of the zip file, you can access files in there with full paths relative to data/, otherwise all files are accessible without further paths.
utunnels
Posts: 37
Joined: Thu Apr 05, 2012 2:52 pm

Re: addFileArchive question

Post by utunnels »

Do I need to keep data folder in that zip file, or only the structure inside data folder?
Does absolute path like D:\irrlicht\test\data\.... still work?

Will try later.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: addFileArchive question

Post by hybrid »

No, the absolute paths won't work if you only provide the mounted zip file. If you keep the data folder as top-level, you have to access files inside the zip folder with data/.... prefixed.
Post Reply