Add missing types to file:open/2 mode()

Kostis Sagonas kostis@REDACTED
Tue Oct 12 13:48:58 CEST 2010


Add the {encoding, _} options to file:open/2's modes

Although the {encoding, encoding()} set of options is documented in
the manual page of the 'file' module, they do not appear in the Mode
description on that page nor in the mode() type declaration.

The patch adds this information in both the code of the module and
the documentation of the module.

To avoid duplication, the declaration of the encoding() type is added
to the 'unicode' module where it most probably belongs.

While at it, added a proper declaration for posix(), took out the
now superfluous information about the types of file:open/2 from the
'erl_bif_types' module, and corrected the return type of file:open/2
so that it corresponds to its published documentation.


   git fetch git://github.com/kostis/otp.git file_open-mode

Kostis

PS. Among other things, this corrects some erroneous dialyzer
     warning reported by Alexey Romanov.  Thanks!


More information about the erlang-patches mailing list