[erlang-questions] some language changes

Ulf Wiger (TN/EAB) ulf.wiger@REDACTED
Wed May 23 22:07:32 CEST 2007


The problem is (1) that epp explicitly calls file:open(),
and has no function that just accepts a file descriptor,
and (2) that epp uses the io subsystem, which requires
file_io_server, which only works on regular files.

This has been discussed in an earlier thread, and 
various workarounds have been presented. Mine was to
make a ram_file_io_server, which I thought was 
trivially easy (after some study of the file IO
system).

BR,
Ulf W

> -----Original Message-----
> From: erlang-questions-bounces@REDACTED 
> [mailto:erlang-questions-bounces@REDACTED] On Behalf Of 
> Bengt Kleberg
> Sent: den 23 maj 2007 17:47
> To: Erlang (E-mail)
> Subject: Re: [erlang-questions] some language changes
> 
> On 2007-05-23 16:39, Ulf Wiger (TN/EAB) wrote:
> ...deleted
> > One problem is that epp is not willing to take just a 
> stream of bytes 
> > (this has been discussed before on this list), but 
> desperately wants 
> > to read a regular file.
> 
> if epp (and others that desperately want a file) also handled 
> an IO object (as returned from file:open/2) the problem would 
> go away. i would expect epp to use file:open/2 on the file 
> and then the IO object in the rest of the code so the change 
> would not be great.
> 
> unless epp does a file:read_file/1 to get all of the file 
> into memory, of course. then epp should be able to handle a 
> binary instead of a file with out any great change.
> 
> 
> bengt
> --
> Those were the days...
>     EPO guidelines 1978: "If the contribution to the known art resides
>     solely in a computer program then the subject matter is not
>     patentable in whatever manner it may be presented in the claims."
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 




More information about the erlang-questions mailing list