this is on a multiplayer server, a close friend of mines
i created a test,txt file, then attempted to get the parent directory of the file i just created, attempting to use the fs.getDir("test.txt") (this is the exact file name
instead i got attempt to call nil, the wiki page isnt much help on this, how would i return the directory of path when path is unknown??
Quote
Function fs.getDir
Returns the parent directory of path. This is the directory a file/folder is in.
Returns the parent directory of path. This is the directory a file/folder is in.
if anyone has any ideas that would be appreciated, seems im trying to use the wrong method
also ive only just started reading Programming in Lua, i'm reasonably new to lua, but i can learn quick off code examples
edit: i want to know how to get the parent directory above the id folder of the computer (eg: saves/computer/ not saves/computer/<id>)
Edited by CreeperGoBoom, 06 May 2014 - 04:44 AM.











