General discussion about LÖVE, Lua, game development, puns, and unicorns.
-
nickelodeon0077
- Prole
- Posts: 22
- Joined: Mon Feb 04, 2019 2:38 pm
- Location: Curitiba, PR, Brazil
Post
by nickelodeon0077 »
Lua I/O work on linux?
i'm updating my
PixelFxDesigner and i need to know
example:
Code: Select all
file_ = io.open("effects\\"..tostring(_name)..".lua", "w")
file_:write(a)
file_:close()
Last edited by
nickelodeon0077 on Wed Feb 06, 2019 6:53 pm, edited 1 time in total.
-
pgimeno
- Party member
- Posts: 3688
- Joined: Sun Oct 18, 2015 2:58 pm
Post
by pgimeno »
io.open works, yes.
The directory separator is / though. Note that / also works on Windows so you can make it work on both by using /.
io.execute works too, but the typically available commands are not anything like on Windows. I'd just stay away from it.
-
nickelodeon0077
- Prole
- Posts: 22
- Joined: Mon Feb 04, 2019 2:38 pm
- Location: Curitiba, PR, Brazil
Post
by nickelodeon0077 »
pgimeno wrote: ↑Wed Feb 06, 2019 6:34 pm
io.open works, yes.
The directory separator is / though. Note that / also works on Windows so you can make it work on both by using /.
io.execute works too, but the typically available commands are not anything like on Windows. I'd just stay away from it.
hmmm thank you, i will go see more of love.filesystem
Users browsing this forum: No registered users and 1 guest