[erlang-bugs] io device() type incomplete
Steve Vinoski
vinoski@REDACTED
Wed Mar 26 13:45:31 CET 2014
On Wed, Mar 26, 2014 at 7:37 AM, Hans Bolinder
<hans.bolinder@REDACTED>wrote:
> Hi,
>
> [Steve Vinoski]:
>
> > The io man page defines the device() type as follows:
> > device() = atom() | pid()
> >
> > An IO device. Either standard_io, standard_error, a registered
> > name, or a pid handling IO protocols (returned from file:open/2).
> >
> > But this is incomplete, since file:open/2 can also return an
> > instance of a file_descriptor record.
> >
> > Also meant to add that there are functions in the io module that take
> > device() type parameters but do not handle file_descriptor records.
>
> If file:open() is called with the 'raw' option a file_descriptor
> record is returned. It cannot be used with the io module.
>
> I'm not sure, but perhaps you've confused the types io:device() and
> file:io_device() with each other?
>
Yes, I did. My mistake, apologies for the noise.
--steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140326/c2469506/attachment.htm>
More information about the erlang-bugs
mailing list