[erlang-bugs] Re: file module documentation: no references to #file_descriptor{}

Raimo Niskanen raimo+erlang-bugs@REDACTED
Thu Jun 18 09:50:01 CEST 2009


On Thu, Jun 18, 2009 at 05:46:42AM +0100, Davide Marquês wrote:
> >
> > The documentation for the file module seems to be
> > incomplete in that it doesn't include any references
> > to the support for #file_descriptor{} (as returned by
> > ram_file:open/2) in the functions that normally receive
> > an io_device().
> 
> 
> Upon closer inspection of file:open/2:
>  - this function also calls ram_file:open/2 if given the *undocumented* ram
> option
>    and will return an #file_descriptor{} (not an io_device())
>  - when using the raw option there is just a *small* reference to the fact
> that
>    the return value is not an io_device() and that functionality will be
> limited
> 
> It's just a matter of adding #file_descriptor{} where it's missing and
> upgrading
> "The functions in the io module cannot be used, because they can only talk
> to an Erlang process. Instead, use the read/2 and write/2 functions."
> to a more visible green box. :)

We will improve the documentation on this.
Thank you for pointing it out. The docs
have gradually grown oversimplified...

> 
> :Davide

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the erlang-bugs mailing list