@@ -1790,18 +1790,25 @@ resolve_application_remote_otp(Config) ->
1790
1790
case has_eep48 (file ) of
1791
1791
true when OtpRelease >= 27 ->
1792
1792
<<
1793
- " ## file:write/2\n\n "
1794
- " ---\n\n ```erlang\n\n "
1795
- " write(File, Bytes) when is_pid(File) orelse is_atom(File)\n\n "
1796
- " write(#file_descriptor{module = Module} = Handle, Bytes) \n\n "
1797
- " write(_, _) \n\n "
1798
- " ```\n\n "
1799
1793
" ```erlang\n "
1800
- " -spec write(IoDevice, Bytes) -> ok | {error, Reason} when\n "
1794
+ " write(IoDevice, Bytes) -> ok | {error, Reason} when\n "
1801
1795
" IoDevice :: io_device() | io:device(),\n "
1802
1796
" Bytes :: iodata(),\n "
1803
1797
" Reason :: posix() | badarg | terminated.\n "
1804
- " ```"
1798
+ " ```\n\n ---\n\n ```"
1799
+ " erlang\n Writes `Bytes` to the file referenced by `IoDevice`."
1800
+ " This function is the only\n way to write to a file opened in"
1801
+ " `raw` mode (although it works for normally\n opened files"
1802
+ " too). Returns `ok` if successful, and `{error, Reason}`"
1803
+ " otherwise.\n\n If the file is opened with `encoding` set to"
1804
+ " something else than `latin1`, each\n byte written can result"
1805
+ " in many bytes being written to the file, as the byte\n range"
1806
+ " 0..255 can represent anything between one and four bytes"
1807
+ " depending on\n value and UTF encoding type. If you want to"
1808
+ " write `t:unicode:chardata/0` to the\n `IoDevice` you should"
1809
+ " use `io:put_chars/2` instead.\n\n Typical error reasons:\n\n "
1810
+ " - **`ebadf`** - The file is not opened for writing.\n\n "
1811
+ " - **`enospc`** - No space is left on the device.\n ```\n "
1805
1812
>>;
1806
1813
true when OtpRelease == 26 ->
1807
1814
<<
@@ -2019,10 +2026,17 @@ resolve_type_application_remote_otp(Config) ->
2019
2026
case has_eep48 (file ) of
2020
2027
true when OtpRelease >= 27 ->
2021
2028
<<
2022
- " ```erlang\n "
2023
- " -type name_all() :: string() | atom() | deep_list() |"
2024
- " (RawFilename :: binary()).\n "
2025
- " ```"
2029
+ " ```erlang\n name_all()\n ```\n\n ---\n\n "
2030
+ " ```erlang\n A file name used as input into `m:file` API"
2031
+ " functions.\n\n If VM is in Unicode filename mode,"
2032
+ " characters are allowed to be > 255.\n `RawFilename`"
2033
+ " is a filename not subject to Unicode translation,"
2034
+ " meaning that it\n can contain characters not conforming"
2035
+ " to the Unicode encoding expected from the\n file system"
2036
+ " (that is, non-UTF-8 characters although the VM is"
2037
+ " started in Unicode\n filename mode). Null characters"
2038
+ " (integer value zero) are _not_ allowed in\n filenames"
2039
+ " (not even at the end).\n ```\n "
2026
2040
>>;
2027
2041
true ->
2028
2042
<<
0 commit comments