Re: [OFF-TOPIC] Current Directory

From: Alex (fletchra@qsilver.queensu.ca)
Date: 03/04/00


> > Just a quick question.  Is there any way to find out what directory
> > your program is currently running in?
> sprintf(buf, "cd > currdir.tmp");
> system(buf);
What a waste of a system call!

   man getcwd

That will do _exactly_ what you want.

Ae.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT