@@ -1772,18 +1772,25 @@ resolve_application_remote_otp(Config) ->
1772
1772
case has_eep48 (file ) of
1773
1773
true when OtpRelease >= 27 ->
1774
1774
<<
1775
- " ## file:write/2\n\n "
1776
- " ---\n\n ```erlang\n\n "
1777
- " write(File, Bytes) when is_pid(File) orelse is_atom(File)\n\n "
1778
- " write(#file_descriptor{module = Module} = Handle, Bytes) \n\n "
1779
- " write(_, _) \n\n "
1780
- " ```\n\n "
1781
1775
" ```erlang\n "
1782
- " -spec write(IoDevice, Bytes) -> ok | {error, Reason} when\n "
1776
+ " write(IoDevice, Bytes) -> ok | {error, Reason} when\n "
1783
1777
" IoDevice :: io_device() | io:device(),\n "
1784
1778
" Bytes :: iodata(),\n "
1785
1779
" Reason :: posix() | badarg | terminated.\n "
1786
- " ```"
1780
+ " ```\n\n ---\n\n ```"
1781
+ " erlang\n Writes `Bytes` to the file referenced by `IoDevice`."
1782
+ " This function is the only\n way to write to a file opened in"
1783
+ " `raw` mode (although it works for normally\n opened files"
1784
+ " too). Returns `ok` if successful, and `{error, Reason}`"
1785
+ " otherwise.\n\n If the file is opened with `encoding` set to"
1786
+ " something else than `latin1`, each\n byte written can result"
1787
+ " in many bytes being written to the file, as the byte\n range"
1788
+ " 0..255 can represent anything between one and four bytes"
1789
+ " depending on\n value and UTF encoding type. If you want to"
1790
+ " write `t:unicode:chardata/0` to the\n `IoDevice` you should"
1791
+ " use `io:put_chars/2` instead.\n\n Typical error reasons:\n\n "
1792
+ " - **`ebadf`** - The file is not opened for writing.\n\n "
1793
+ " - **`enospc`** - No space is left on the device.\n ```\n "
1787
1794
>>;
1788
1795
true when OtpRelease == 26 ->
1789
1796
<<
@@ -2001,10 +2008,17 @@ resolve_type_application_remote_otp(Config) ->
2001
2008
case has_eep48 (file ) of
2002
2009
true when OtpRelease >= 27 ->
2003
2010
<<
2004
- " ```erlang\n "
2005
- " -type name_all() :: string() | atom() | deep_list() |"
2006
- " (RawFilename :: binary()).\n "
2007
- " ```"
2011
+ " ```erlang\n name_all()\n ```\n\n ---\n\n "
2012
+ " ```erlang\n A file name used as input into `m:file` API"
2013
+ " functions.\n\n If VM is in Unicode filename mode,"
2014
+ " characters are allowed to be > 255.\n `RawFilename`"
2015
+ " is a filename not subject to Unicode translation,"
2016
+ " meaning that it\n can contain characters not conforming"
2017
+ " to the Unicode encoding expected from the\n file system"
2018
+ " (that is, non-UTF-8 characters although the VM is"
2019
+ " started in Unicode\n filename mode). Null characters"
2020
+ " (integer value zero) are _not_ allowed in\n filenames"
2021
+ " (not even at the end).\n ```\n "
2008
2022
>>;
2009
2023
true ->
2010
2024
<<
0 commit comments