Jump to content




how to make a new "folder"


  • You cannot reply to this topic
2 replies to this topic

#1 dcleondc

  • New Members
  • 70 posts

Posted 01 September 2012 - 07: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

#2 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 01 September 2012 - 08:02 PM

You need to create the directory first, using:
fs.makeDir(path)


#3 dcleondc

  • New Members
  • 70 posts

Posted 01 September 2012 - 08:35 PM

TY, i feel dumb right now because i have the fs api page open in a tab





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users