Page 1 of 2
Changing the save directory
Posted: Thu Oct 10, 2013 4:52 pm
by Bicentric
-
Re: Changing the save directory
Posted: Thu Oct 10, 2013 5:05 pm
by ejmr
The string you use for the identity will be the name of the directory where LÖVE will write your files. However, LÖVE has restrictions on where you can work with files. It only allows you to write files in the 'save directory' which uses the name of the identity. But the location of that directory depends on the operating system and you cannot do something like try setting the identity to an absolute path. This page has more details about LÖVE and files:
http://love2d.org/wiki/love.filesystem
Re: Changing the save directory
Posted: Thu Oct 10, 2013 5:32 pm
by Bicentric
-
Re: Changing the save directory
Posted: Thu Oct 10, 2013 6:10 pm
by ejmr
Bicentric wrote:With that being said I change my original question, what would be the best way of saving files to a directory across both operating systems?
There is nothing you need to do in order to save files on different operating systems. LÖVE knows where to put them and hides a lot of those details when reading and writing files so that you don’t have to worry about it. If you want to know where those directories are you can use the functions I mention below.
Bicentric wrote:Or is there a way to overcome this and be able to save my files to an absolute path?
As far as I know you can’t do that, but I could be wrong. You can use love.filesystem functions to get information about absolute paths, e.g. anything in the form of love.filesystem.get*Directory(). But you can’t use that to start saving your files in those directories.
Re: Changing the save directory
Posted: Sat Jan 29, 2022 5:34 pm
by RedGuff
This system is bad: impossible to make utility programs.
Re: Changing the save directory
Posted: Sat Jan 29, 2022 5:40 pm
by dusoft
RedGuff wrote: ↑Sat Jan 29, 2022 5:34 pm
This system is bad: impossible to make utility programs.
You can always use lua filesystem functions on top of anything that LÖVE offers.
Re: Changing the save directory
Posted: Sat Jan 29, 2022 6:10 pm
by GVovkiv
RedGuff wrote: ↑Sat Jan 29, 2022 5:34 pm
This system is bad: impossible to make utility programs.
as was mentioned, you can use lua's io or change love's source to add this functionaity
but, why you want to use game framework to make programs?
aren't there no tools for that?
Re: Changing the save directory
Posted: Sun Jan 30, 2022 11:19 am
by zorg
Maybe because someone wants to? I do that too because it's still simpler than learning anything new to code a non-game app.
Also, you can use NativeFS that's been rehosted here:
https://github.com/EngineerSmith/nativefs
(also gg bumping a thread from 2013)
Re: Changing the save directory
Posted: Sun Jan 30, 2022 11:31 am
by GVovkiv
zorg wrote: ↑Sun Jan 30, 2022 11:19 am
Maybe because someone wants to? I do that too because it's still simpler than learning anything new to code a non-game app.
Also, you can use NativeFS that's been rehosted here:
https://github.com/EngineerSmith/nativefs
(also gg bumping a thread from 2013)
(also gg bumping a thread from 2013)
like something bad
Re: Changing the save directory
Posted: Thu Apr 07, 2022 5:24 pm
by RedGuff
Thanks all of you.