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

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: 728
Joined: Sat Apr 26, 2014 7:46 pm

Re: READ DATA FROM SDCARD

Post by bobbyjones » Sat Mar 21, 2020 4:37 am

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.
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.

tonymin
Prole
Posts: 5
Joined: Fri Mar 20, 2020 10:59 pm

Re: READ DATA FROM SDCARD

Post by tonymin » Sat Mar 21, 2020 7:45 am

Do you know if the developers plan to add this to LOVE?

bobbyjones
Party member
Posts: 728
Joined: Sat Apr 26, 2014 7:46 pm

Re: READ DATA FROM SDCARD

Post by bobbyjones » Sat Mar 21, 2020 8:02 am

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.
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.

User avatar
pgimeno
Party member
Posts: 2338
Joined: Sun Oct 18, 2015 2:58 pm

Re: READ DATA FROM SDCARD

Post by pgimeno » Sat Mar 21, 2020 11:26 am

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 » Sat Mar 21, 2020 10:39 pm

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: Google [Bot] and 30 guests