[erlang-questions] Current working directory

Adam Lindberg adam@REDACTED
Wed Apr 16 09:13:21 CEST 2008


Sorry, I was too hasty! It just came to me after sending the email:

1> filename:absname("").
"/home/alind"
2>

But it was not that intuitive. ;-)

Cheers!
Adam
--
Adam Lindberg
http://www.erlang-consulting.com

On Wed, Apr 16, 2008 at 9:09 AM, Adam Lindberg
<adam@REDACTED> wrote:
> Hi all!
>
>  I'm writing an escript and is trying to figure out which directory
>  it's being run in. However, I can't seem to find a function to get the
>  current working directory (pwd on *NIX) in Erlang. There is one in the
>  module 'c', but it just returns 'ok' and prints the directory instead
>  of returning it! How can I get the current working directory in
>  Erlang?
>
>  Cheers!
>  Adam
>  --
>  Adam Lindberg
>  http://www.erlang-consulting.com
>



More information about the erlang-questions mailing list