file module documentation: no references to #file_descriptor{}

Davide Marquês nesrait@REDACTED
Thu Jun 18 06:46:42 CEST 2009


>
> 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. :)

:Davide


More information about the erlang-bugs mailing list