How does love.filesystem.read work?

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
MegaByte
Prole
Posts: 4
Joined: Sat Mar 01, 2025 7:57 pm

How does love.filesystem.read work?

Post by MegaByte »

I'm trying to create a script that writes the IP, login, and password of a server to a file. Then, the script runs 'com.exe' and reads the data from 'output.d'. However, the script is returning text that doesn't appear in 'output.d', and I can't figure out why this is happening. I reviewed the documentation for love.filesystem.read(), but I still don't fully understand how it works.

Code: Select all

local out, erro = love.filesystem.read("output.d")
print(out, erro)
terminal :
test.png
test.png (308 Bytes) Viewed 542 times
files:
files.png
files.png (1.61 KiB) Viewed 542 times
output.d:
out.png
out.png (4.05 KiB) Viewed 542 times
User avatar
ivan
Party member
Posts: 1939
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: How does love.filesystem.read work?

Post by ivan »

love.filesystem.read() works using relative paths inside the source or appdata directory.
Where is the file located in your case?
MegaByte
Prole
Posts: 4
Joined: Sat Mar 01, 2025 7:57 pm

Re: How does love.filesystem.read work?

Post by MegaByte »

ivan wrote: Thu Mar 06, 2025 5:28 am love.filesystem.read() works using relative paths inside the source or appdata directory.
Where is the file located in your case?
Thank you very much for your help but I just realized what I did wrong and now I have fixed the problem.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests