문제

I'm using chicagoboss for web development. To test some test modules I would like to change my current directory to something else. I know I can change directory by specifying full path to to cd("full path"). Suppose I'm in a directory "/home/user/workspace/myproject/myapp/" where I'm running myproject project.But now I want to check my current location using erlang shell.

Is there any function/command in erlang to get current working directory? In python I was using os.getcwd().

도움이 되었습니까?

해결책

Try:

{ok, CurrentDirectory} = file:get_cwd().

Also check out erldocs.com to quickly look up functions in the Erlang documentation.

다른 팁

Use the command:

pwd().

More text to get to the Stackoverflow minimum

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top