![]() ![]() ![]() Depending on your setup, you might have to compile it before being able to use it. This will work on windows, linux and mac.īeware though that these external libraries usually involve some binary packages. Once it is installed, you can get the current directory by executing: lfs.currentdir() ![]() There are several - I recommend luafilesystem. The proper way to get the current directory is using a library that provides folder support. Lua by default doesn't have a "native" way of supporting the concept of "current directory", or, in fact, the concept of "directory". Maybe some ugly hack like current_dir= io. I can't use os.execute("cd") because os.execute always starts from my home directory (and thus always yields C:\Documents and Settings\username). What's the Lua to get the current working directory on Windows XP SP3 (or to get the directory of the currently-running Lua file)? I prefer not to use LuaFileSystem. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |