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

Soooo.....does it work?
Anyone have any feedback on whether (and how) it can be made better, more efficient/portable?
The dirname variable on my local copy has been changed to 'd' to avoid confusion with the function name, but apart from that I'm not sure how to improve it. Also still not sure if it works on Windows or Mac.

The gsub grabs everything up to and including the last slash or backslash in the filename. I assume that's pretty much the same thing that the dirname command does, since both appear to simply work on a given string rather than check whether or not it's actually an existing file or directory. The fl_filename_ext() function seems to work the same way.

07-17-2007 03:32 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-17-2007 03:32 AM

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

Forum Jump: