Page 1 of 1

READ DATA FROM SDCARD

Posted: Fri Mar 20, 2020 11:05 pm
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)?

Re: READ DATA FROM SDCARD

Posted: Sat Mar 21, 2020 4:37 am
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.

Re: READ DATA FROM SDCARD

Posted: Sat Mar 21, 2020 7:45 am
by tonymin
Do you know if the developers plan to add this to LOVE?

Re: READ DATA FROM SDCARD

Posted: Sat Mar 21, 2020 8:02 am
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.

Re: READ DATA FROM SDCARD

Posted: Sat Mar 21, 2020 11:26 am
by pgimeno
I believe you can freely use the io.xxxx functions, if that helps.

Re: READ DATA FROM SDCARD

Posted: Sat Mar 21, 2020 10:39 pm
by tonymin
I need it, becuase I try to make game engine. I fought good analog - callback function "love.filedropped"