Posted 06 May 2014 - 05:06 AM
ok, i am thinking of writing a few programs which will act as server pcs allowing for easy internetwork communication between the computers added to said network, would even allow me to install a particular program just by choosing a particular network name, only thing is ive hit a hurdle
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??
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>)
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??
Function fs.getDir
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 on 06 May 2014 - 03:44 AM