Retrogamecoding(.org) > EGSL
EGSL IDE (Haiku) Templates
Tomaaz:
--- Quote from: GEEK on March 04, 2014, 07:38:22 PM ---hey :) just started:
--- Code: ----- readout a textfile
function read_file(path)
local file = io.open(path)
local string = file:read("*all")
file.close()
print(string)
end
read_file("my_file.txt")
--- End code ---
--- End quote ---
It would be better if the function returns the content of the file:
--- Code: ----- readout a textfile
function read_file(path)
local file = io.open(path)
local string = file:read("*all")
file.close()
return (string)
end
content = read_file("my_file.txt")
--- End code ---
--- Quote from: GEEK on March 04, 2014, 07:38:22 PM ---readout a directory ???
--- End quote ---
Not possible without luafilesystem. I don't know if it was ported to Haiku. I also don't know if you could use luarocks to install it.
GEEK:
yes, you can do that to, i'd just wanted to keep it simple ;)
lelldorin:
Nice, thank you :-)
lelldorin:
So, EGSL is available for the Haiku operating system again, i would ask again for templates i can add to my IDE.
If you have some things who can be added as template let me know.
Greetings Lelldorin
Navigation
[0] Message Index
[*] Previous page
Go to full version