diff options
author | Kostis Sagonas <[email protected]> | 2010-10-12 14:35:48 +0300 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-10-14 15:29:08 +0200 |
commit | 67513294cd100042ba04e45a181253c29fead288 (patch) | |
tree | 9cc860ab90c62c98eada97ebe6fed67b78f17c71 /lib/kernel/doc | |
parent | d8f8eeba477fd8872f1136fc507fa299f013cc46 (diff) | |
download | otp-67513294cd100042ba04e45a181253c29fead288.tar.gz otp-67513294cd100042ba04e45a181253c29fead288.tar.bz2 otp-67513294cd100042ba04e45a181253c29fead288.zip |
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 the published documentation.
Diffstat (limited to 'lib/kernel/doc')
-rw-r--r-- | lib/kernel/doc/src/file.xml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index 2044b074ee..64cdd3a8ea 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -603,8 +603,10 @@ f.txt: {person, "kalle", 25}. <type> <v>Filename = name()</v> <v>Modes = [Mode]</v> - <v> Mode = read | write | append | exclusive | raw | binary | {delayed_write, Size, Delay} | delayed_write | {read_ahead, Size} | read_ahead | compressed</v> + <v> Mode = read | write | append | exclusive | raw | binary | {delayed_write, Size, Delay} | delayed_write | {read_ahead, Size} | read_ahead | compressed | {encoding, Encoding}</v> <v> Size = Delay = int()</v> + <v> Encoding = latin1 | unicode | utf8 | utf16 | {utf16, Endian} | utf32 | {utf32, Endian}</v> + <v> Endian = big | little</v> <v>IoDevice = io_device()</v> <v>Reason = ext_posix() | system_limit</v> </type> |