[erlang-questions] Re: file operations on zipped files (Re: how to add a module to preLoaded?)

Ulf Wiger ulf.wiger@REDACTED
Tue Apr 5 17:13:05 CEST 2011

On 5 Apr 2011, at 16:52, Håkan Mattsson wrote:
> > Eshell V5.8.4  (abort with ^G)
> > 1> application:load(proper).
> > ok
> > 2> code:lib_dir(proper,include).
> > "./run_proper/include"
> > 3> code:where_is_file("proper.app").
> > "run_proper.ez/proper/ebin/proper.app"
> code:lib_dir(proper,include) should handle this. It will return
> "run_proper.ez/proper/include" if the setup is correct. But it
> requires that there is no "run_proper/include" directory AND
> that the directory "run_proper.ez/proper/include" really exists.

I'm happy to hear that it should, however...

$ ls
$ erl -pa ./run_proper.ez/proper/ebin
Erlang R14B03 (erts-5.8.4) [source] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.8.4  (abort with ^G)
1> code:lib_dir(proper,include).
2> erl_prim_loader:get_file("run_proper.ez/proper/include/proper.hrl").
{ok,<<"%%% Copyright 2010 Manolis Papadakis (manopapad@REDACTED)\n%%%            and Kostis Sagonas (kostis@REDACTED"...>>,
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
$ ls

At the very least, I am convinced that "./run_proper/include" does *not* exist in this case.

Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110405/8d0b252e/attachment.htm>

More information about the erlang-questions mailing list