This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
dcleondc's profile picture

how to make a new "folder"

Started by dcleondc, 01 September 2012 - 06:53 PM
dcleondc #1
Posted 01 September 2012 - 08:53 PM
hello im making a program and i wanted it to store all of its info in a folder and i tried this

local file = io.open("Test/Test.txt", "w")
file:write("{ }")
file:close()
but it didn't work
MysticT #2
Posted 01 September 2012 - 09:02 PM
You need to create the directory first, using:

fs.makeDir(path)
dcleondc #3
Posted 01 September 2012 - 09:35 PM
TY, i feel dumb right now because i have the fs api page open in a tab