News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Function to return the current directory
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: Function to return the current directory

I have had the same desire, and so far have not found a reasonable solution. For an application that would be targeted to Linux systems, I have wrapped up the lua script inside a shell script, having the shell commands check the directory and then send it to murgaLua as a variable or commandline parameter, but it's not very portable. Even that requires some extra work, since you also have to check whether the file is actually the script or just a link to the script.

EDIT: There must be something within Lua that can be used for this purpose. It already is aware of where the script is, considering it uses relative paths for dofile(), so I guess the question must be where does it store that info?

This post was last modified: 07-16-2007 02:35 AM by mikshaw.

07-16-2007 02:12 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
RE: Function to return the current directory - mikshaw - 07-16-2007 02:12 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: