code:priv_dir()

Ulf Wiger <>
Wed Dec 5 16:56:33 CET 2001


On Wed, 5 Dec 2001, Bengt Kleberg wrote:

>But setting the path
>code:add_path("tmp/cnh2").
>did not find priv_dir.
>
>(whereas setting the path
>code:add_path("tmp/cnh2/ebin"
>did find it)

Hmm, perhaps there are some weird side-effects in my environment,
but:

1> file:make_dir("tmp").
ok
2> file:make_dir("tmp/cnh2").
ok
3> file:make_dir("tmp/cnh2/priv").
ok
4> code:add_path("tmp/cnh2").
true
5> code:priv_dir(cnh2).
"tmp/cnh2/priv"

It certainly does work for me.
I consider this to be more or less a bug anyway(*), and will
not complain if it suddenly stops working.

(*) until someone explains how the above behaviour is actually
a feature.

/Uffe
-- 
Ulf Wiger, Senior Specialist,
   / / /   Architecture & Design of Carrier-Class Software
  / / /    Strategic Product & System Management
 / / /     Ericsson Telecom AB, ATM Multiservice Networks




More information about the erlang-questions mailing list