Loading files outside the .love file
Posted: Mon Jan 23, 2012 6:14 pm
Hey, looking for some help.
I need to load a file outside the .love folder (basically an .ini file that allows the user to configure some stuff outside the game). I'll be compiling to an .exe, but the user needs to be able to edit this file, so it's got to go outside the project directory. The file just shares a folder with the .love (or complied .exe) so I was pretty stumped when "../filename" didn't locate it, so I did some digging around and apparently Love has issues loading stuff that's not in the project directory, or the write directory... and I can't specify the file path for the write directory, just a name?
Would it be possible to set the write directory to some known location (ideally the folder that contains the .exe) so it can read the .ini from there? Or is there something more obvious that I'm missing?
Thanks.
I need to load a file outside the .love folder (basically an .ini file that allows the user to configure some stuff outside the game). I'll be compiling to an .exe, but the user needs to be able to edit this file, so it's got to go outside the project directory. The file just shares a folder with the .love (or complied .exe) so I was pretty stumped when "../filename" didn't locate it, so I did some digging around and apparently Love has issues loading stuff that's not in the project directory, or the write directory... and I can't specify the file path for the write directory, just a name?
Would it be possible to set the write directory to some known location (ideally the folder that contains the .exe) so it can read the .ini from there? Or is there something more obvious that I'm missing?
Thanks.