READ DATA FROM SDCARD

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
tonymin
Prole
Posts: 5
Joined: Fri Mar 20, 2020 10:59 pm

READ DATA FROM SDCARD

Post by tonymin »

How to read data NOT from AppData (on Windows) and NOT from .local / share / love (on Linux), but from ordinary user memory (from an SD card, for example)?
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: READ DATA FROM SDCARD

Post by bobbyjones »

You can't without using a library or ffi. Unless you are on Android. I believe the flag "t.external" or whatever it is is still a thing. It basically determines where your save directory is located. The Android external fs or the internal one. You still locked to just the save directory though.
tonymin
Prole
Posts: 5
Joined: Fri Mar 20, 2020 10:59 pm

Re: READ DATA FROM SDCARD

Post by tonymin »

Do you know if the developers plan to add this to LOVE?
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: READ DATA FROM SDCARD

Post by bobbyjones »

I am pretty certain the answer is no. I forgot the reason why tbh. I think its mainly to prevent user error. Honestly thinking about it it is a pretty stupid limitation. Although I will say in the scope of strictly game development it's reasonable. I don't really play games that often but I don't see needing access to the full filesystem as useful for most games.
User avatar
pgimeno
Party member
Posts: 3673
Joined: Sun Oct 18, 2015 2:58 pm

Re: READ DATA FROM SDCARD

Post by pgimeno »

I believe you can freely use the io.xxxx functions, if that helps.
tonymin
Prole
Posts: 5
Joined: Fri Mar 20, 2020 10:59 pm

Re: READ DATA FROM SDCARD

Post by tonymin »

I need it, becuase I try to make game engine. I fought good analog - callback function "love.filedropped"
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests