[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:50:05 CEST 2011
On 5 Apr 2011, at 16:52, Håkan Mattsson wrote:
> Yes, either that or modify epp to read via erl_prim_loader.
Oh, the other - bigger - objection to that is that epp uses file:open/2 and then the file_io_server functionality* to fetch parsed forms from the file.
The reason why I mentioned read_file in this case was just because I used that to fetch the file and put it into a ram_file, and then making prim_file "ram_file-aware".
BR,
Ulf W
* Actually, the call is:
scan_toks(From, St) ->
case io:scan_erl_form(St#epp.file, '', St#epp.location) of
….
end.
where io:scan_erl_form/2 becomes an io_request to the file_io_server.
Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com
More information about the erlang-questions
mailing list