filesystem.read and enumerate

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

filesystem.read and enumerate

Post by Lap »

So filesystem.save will save games to the save directory fine, but I have no idea how I point filesystem.read or enumerate to this save directory. Absolute paths don't work. Using getSaveDirectory also won't work.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: filesystem.read and enumerate

Post by TechnoCat »

https://bitbucket.org/dannyfritz/pindie ... /SaveLoad/
Here is an example of saving and loading a file to the save directory.
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

Re: filesystem.read and enumerate

Post by Lap »

So then the real problem is that there's no way to actually see inside the save directory since enumerate doesn't work. Massive oversight?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: filesystem.read and enumerate

Post by Robin »

But you can!

Due to a bug, you need to do

Code: Select all

love.filesystem.enumerate('whateveryouridentityis')
Help us help you: attach a .love.
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

Re: filesystem.read and enumerate

Post by Lap »

Hmmm, it appears that only works if you use setIdentity first, even if you just setIdentity to an empty string. Odd, but glad it's working.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: filesystem.read and enumerate

Post by TechnoCat »

Set the identity in you conf.lua files.
t.identity i think. http://love2d.org/wiki/Config_Files
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

Re: filesystem.read and enumerate

Post by Lap »

Figured you only needed to do that if you wanted a save directory other than ''. You save to there without setting identity anyways.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 32 guests