[erlang-questions] Problem with code:priv_dir

Robert Baruch autophile@REDACTED
Sun Feb 11 21:55:54 CET 2007

Hi all,

Here's my scenario, running R11B-2. In my home directory, I have the  
following directories:


Now, I fire up the erl shell and try to run code:priv_dir(mytest):

ekmac:~ ek$ erl
Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0]  
[hipe] [kernel-poll:false]

Eshell V5.5.2  (abort with ^G)
1> code:priv_dir(mytest).
2> code:get_path().
(and so on)

Now, what I don't get is that the documentation for code:priv_dir/1  

"Searches the code path for a directory named .../Name[-Vsn][/ebin]  
and returns the directory .../Name[-Vsn]/priv. It is not checked if  
this directory really exists."

Code path contains "." ... check.
./mytest-0.1/ebin ... check.

So why isn't priv_dir/1 returning "./mytest-0.1/priv"?

Thanks for any help!


More information about the erlang-questions mailing list