Lua I/O work on linux? [YES]

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
nickelodeon0077
Prole
Posts: 22
Joined: Mon Feb 04, 2019 2:38 pm
Location: Curitiba, PR, Brazil

Lua I/O work on linux? [YES]

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.
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: Lua I/O work on linux?

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

Re: Lua I/O work on linux?

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
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 97 guests