aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-05-05 14:51:24 +0200
committerIngela Anderton Andin <[email protected]>2015-05-05 14:51:24 +0200
commitd6421c98edf2cdd5c3e27c2c7f7a2f59b17487ab (patch)
tree96c19203e8a6edf8abfd1e5e0d351cd5bfc00a5e
parent01f44008ec5a3dc02e803f22564c8184a9745d69 (diff)
parent5d6805703035d88a44265b3e0e1337d4e8388c10 (diff)
downloadotp-d6421c98edf2cdd5c3e27c2c7f7a2f59b17487ab.tar.gz
otp-d6421c98edf2cdd5c3e27c2c7f7a2f59b17487ab.tar.bz2
otp-d6421c98edf2cdd5c3e27c2c7f7a2f59b17487ab.zip
Merge branch 'ia/ssh/docs'
* ia/ssh/docs: ssh: No description in v-tag ssh: Fix missed alphabetic ordering and indentation ssh: Use correct ASCII char for quote ssh: Fix links
-rw-r--r--lib/ssh/doc/src/ssh_channel.xml22
-rw-r--r--lib/ssh/doc/src/ssh_sftp.xml112
2 files changed, 69 insertions, 65 deletions
diff --git a/lib/ssh/doc/src/ssh_channel.xml b/lib/ssh/doc/src/ssh_channel.xml
index 429ef3c849..b8a03c350a 100644
--- a/lib/ssh/doc/src/ssh_channel.xml
+++ b/lib/ssh/doc/src/ssh_channel.xml
@@ -88,7 +88,7 @@
<fsummary>Makes a synchronous call to a channel.</fsummary>
<type>
<v>ChannelRef = pid() </v>
- <d>As returned by <c>start_link/4</c></d>
+ <d>As returned by <seealso marker = "#start_link-4">ssh_channel:start_link/4</seealso></d>
<v>Msg = term()</v>
<v>Timeout = timeout()</v>
<v>Reply = term()</v>
@@ -112,7 +112,7 @@
ChannelRef and returns ok.</fsummary>
<type>
<v>ChannelRef = pid()</v>
- <d>As returned by <c>start_link/4</c></d>
+ <d>As returned by <seealso marker = "#start_link-4">ssh_channel:start_link/4</seealso></d>
<v>Msg = term()</v>
</type>
<desc>
@@ -129,8 +129,8 @@
<name>enter_loop(State) -> _ </name>
<fsummary>Makes an existing process an ssh_channel process.</fsummary>
<type>
- <v>State = term() - as returned by
- <seealso marker = "#init-1">ssh_channel:init/1</seealso></v>
+ <v>State = term()</v>
+ <d>as returned by <seealso marker = "#init-1">ssh_channel:init/1</seealso></d>
</type>
<desc>
<p>Makes an existing process an <c>ssh_channel</c>
@@ -188,7 +188,7 @@
<name>reply(Client, Reply) -> _</name>
<fsummary>Sends a reply to a client.</fsummary>
<type>
- <v>Client - opaque to the user, see explanation below</v>
+ <v>Client = opaque()</v>
<v>Reply = term()</v>
</type>
<desc>
@@ -259,7 +259,7 @@
<v>State = term()</v>
<d>Internal state of the channel.</d>
<v>Extra = term()</v>
- <d>Passed “as-is” from the <c>{advanced,Extra}</c>
+ <d>Passed "as-is" from the <c>{advanced,Extra}</c>
part of the update instruction.</d>
</type>
<desc>
@@ -313,13 +313,15 @@
<c>ssh_channel:call/[2,3]</c>.</fsummary>
<type>
<v>Msg = term()</v>
- <v>From = Opaque to the user, is to be used as argument to
- ssh_channel:reply/2</v>
+ <v>From = opaque()</v>
+ <d>Is to be used as argument to
+ <seealso marker="#reply-2">ssh_channel:reply/2</seealso></d>
<v>State = term()</v>
<v>Result = {reply, Reply, NewState} | {reply, Reply, NewState, timeout()}
| {noreply, NewState} | {noreply , NewState, timeout()}
| {stop, Reason, Reply, NewState} | {stop, Reason, NewState} </v>
- <v>Reply = term() - will be the return value of ssh_channel:call/[2,3]</v>
+ <v>Reply = term()</v>
+ <d>Will be the return value of <seealso marker="#call-2">ssh_channel:call/[2,3]</seealso></d>
<v>NewState = term()</v>
<v>Reason = term()</v>
</type>
@@ -418,7 +420,7 @@
<func>
<name>Module:terminate(Reason, State) -> _</name>
<fsummary>Does cleaning up before channel process termination.
-</fsummary>
+ </fsummary>
<type>
<v>Reason = term()</v>
<v>State = term()</v>
diff --git a/lib/ssh/doc/src/ssh_sftp.xml b/lib/ssh/doc/src/ssh_sftp.xml
index 02970bfa42..643130fe6b 100644
--- a/lib/ssh/doc/src/ssh_sftp.xml
+++ b/lib/ssh/doc/src/ssh_sftp.xml
@@ -70,10 +70,28 @@
<desc><p>The <c><![CDATA[apread]]></c> function reads from a specified position,
combining the <c><![CDATA[position]]></c> and <c><![CDATA[aread]]></c> functions.</p>
- <p><seealso marker="#apread/3">ssh_sftp:apread/4</seealso></p> </desc>
+ <p><seealso marker="#apread-4">ssh_sftp:apread/4</seealso></p> </desc>
</func>
<func>
+ <name>apwrite(ChannelPid, Handle, Position, Data) -> ok | {error, Reason}</name>
+ <fsummary>Writes asynchronously to an open file.</fsummary>
+ <type>
+ <v>ChannelPid = pid()</v>
+ <v>Handle = term()</v>
+ <v>Position = integer()</v>
+ <v>Len = integer()</v>
+ <v>Data = binary()</v>
+ <v>Timeout = timeout()</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p><c><![CDATA[apwrite]]></c> writes on a specified position, combining
+ the <c><![CDATA[position]]></c> and <c><![CDATA[awrite]]></c> operations.</p>
+ <p><seealso marker="#awrite-3">ssh_sftp:awrite/3</seealso> </p></desc>
+ </func>
+
+ <func>
<name>aread(ChannelPid, Handle, Len) -> {async, N} | {error, Error}</name>
<fsummary>Reads asynchronously from an open file.</fsummary>
<type>
@@ -95,23 +113,7 @@
</desc>
</func>
- <func>
- <name>apwrite(ChannelPid, Handle, Position, Data) -> ok | {error, Reason}</name>
- <fsummary>Writes asynchronously to an open file.</fsummary>
- <type>
- <v>ChannelPid = pid()</v>
- <v>Handle = term()</v>
- <v>Position = integer()</v>
- <v>Len = integer()</v>
- <v>Data = binary()</v>
- <v>Timeout = timeout()</v>
- <v>Reason = term()</v>
- </type>
- <desc>
- <p><c><![CDATA[apwrite]]></c> writes on a specified position, combining
- the <c><![CDATA[position]]></c> and <c><![CDATA[awrite]]></c> operations.</p>
- <p><seealso marker="#awrite/3">ssh_sftp:awrite/3</seealso> </p></desc>
- </func>
+
<func>
<name>awrite(ChannelPid, Handle, Data) -> ok | {error, Reason}</name>
@@ -163,7 +165,7 @@
</type>
<desc>
<p>Deletes the file specified by <c><![CDATA[Name]]></c>, like
- <seealso marker="kernel:file#delete/1">file:delete/1</seealso></p>
+ <seealso marker="kernel:file#delete-1">file:delete/1</seealso></p>
</desc>
</func>
@@ -232,7 +234,7 @@
<desc>
<p>Creates a symbolic link pointing to <c><![CDATA[Target]]></c> with the
name <c><![CDATA[Name]]></c>, like
- <seealso marker="kernel:file#make_symlink/2">file:make_symlink/2</seealso></p>
+ <seealso marker="kernel:file#make_symlink-2">file:make_symlink/2</seealso></p>
</desc>
</func>
@@ -297,7 +299,7 @@
<desc>
<p>Opens a handle to a tar file on the server, associated with <c>ChannelPid</c>.
The handle can be used for remote tar creation and extraction, as defined by the
- <seealso marker="stdlib:erl_tar#init/3">erl_tar:init/3</seealso> function.
+ <seealso marker="stdlib:erl_tar#init-3">erl_tar:init/3</seealso> function.
</p>
<p> For code exampel see Section
@@ -387,7 +389,7 @@
<desc>
<p>The <c><![CDATA[pread]]></c> function reads from a specified position,
combining the <c><![CDATA[position]]></c> and <c><![CDATA[read]]></c> functions.</p>
- <p><seealso marker="#read/4">ssh_sftp:read/4</seealso></p>
+ <p><seealso marker="#read-4">ssh_sftp:read/4</seealso></p>
</desc>
</func>
@@ -406,7 +408,7 @@
<desc>
<p>The <c><![CDATA[pread]]></c> function writes to a specified position,
combining the <c><![CDATA[position]]></c> and <c><![CDATA[write]]></c> functions.</p>
- <p><seealso marker="#write/3">ssh_sftp:write/3</seealso></p>
+ <p><seealso marker="#write-3">ssh_sftp:write/3</seealso></p>
</desc>
</func>
@@ -449,7 +451,7 @@
<desc>
<p>Reads a file from the server, and returns the data in a binary,
like
- <seealso marker="kernel:file#read_file/1">file:read_file/1</seealso></p>
+ <seealso marker="kernel:file#read_file-1">file:read_file/1</seealso></p>
</desc>
</func>
@@ -468,7 +470,7 @@
<desc>
<p>Returns a <c><![CDATA[file_info]]></c> record from the file specified by
<c><![CDATA[Name]]></c> or <c><![CDATA[Handle]]></c>,
- like <seealso marker="kernel:file#read_file_info/2">file:read_file_info/2</seealso></p>
+ like <seealso marker="kernel:file#read_file_info-2">file:read_file_info/2</seealso></p>
</desc>
</func>
@@ -485,7 +487,7 @@
<desc>
<p>Reads the link target from the symbolic link specified
by <c><![CDATA[name]]></c>, like
- <seealso marker="kernel:file#read_link/1">file:read_link/1</seealso></p>
+ <seealso marker="kernel:file#read_link-1">file:read_link/1</seealso></p>
</desc>
</func>
@@ -504,7 +506,7 @@
<desc>
<p>Returns a <c><![CDATA[file_info]]></c> record from the symbolic
link specified by <c><![CDATA[Name]]></c> or <c><![CDATA[Handle]]></c>, like
- <seealso marker="kernel:file#read_link_info/2">file:read_link_info/2</seealso></p>
+ <seealso marker="kernel:file#read_link_info-2">file:read_link_info/2</seealso></p>
</desc>
</func>
@@ -522,7 +524,7 @@
<desc>
<p>Renames a file named <c><![CDATA[OldName]]></c> and gives it the name
<c><![CDATA[NewName]]></c>, like
- <seealso marker="kernel:file#rename/2">file:rename/2</seealso></p>
+ <seealso marker="kernel:file#rename-2">file:rename/2</seealso></p>
</desc>
</func>
@@ -580,26 +582,7 @@
</type>
<desc>
<p>Stops an SFTP channel. Does not close the SSH connection.
- Use <seealso marker="ssh#close/1">ssh:close/1</seealso> to close it.</p>
- </desc>
- </func>
-
- <func>
- <name>write_file(ChannelPid, File, Iolist) -></name>
- <name>write_file(ChannelPid, File, Iolist, Timeout) -> ok | {error, Reason}</name>
- <fsummary>Writes a file.</fsummary>
- <type>
- <v>ChannelPid = pid()</v>
- <v>File = string()</v>
- <v>Iolist = iolist()</v>
- <v>Timeout = timeout()</v>
- <v>Reason = term()</v>
- </type>
- <desc>
- <p>Writes a file to the server, like <seealso
- marker="kernel:file#write_file/2">file:write_file/2</seealso> The
- file is created if it does not exist. The file is overwritten
- if it exists.</p>
+ Use <seealso marker="ssh#close-1">ssh:close/1</seealso> to close it.</p>
</desc>
</func>
@@ -617,9 +600,9 @@
</type>
<desc>
<p>Writes <c><![CDATA[data]]></c> to the file referenced by <c><![CDATA[Handle]]></c>.
- The file is to be opened with <c><![CDATA[write]]></c> or <c><![CDATA[append]]></c>
- flag. Returns <c><![CDATA[ok]]></c> if successful or <c><![CDATA[{error, Reason}]]></c>
- otherwise.</p>
+ The file is to be opened with <c><![CDATA[write]]></c> or <c><![CDATA[append]]></c>
+ flag. Returns <c><![CDATA[ok]]></c> if successful or <c><![CDATA[{error, Reason}]]></c>
+ otherwise.</p>
<p>Typical error reasons:</p>
<taglist>
<tag><c><![CDATA[ebadf]]></c></tag>
@@ -633,7 +616,26 @@
</taglist>
</desc>
</func>
-
+
+ <func>
+ <name>write_file(ChannelPid, File, Iolist) -></name>
+ <name>write_file(ChannelPid, File, Iolist, Timeout) -> ok | {error, Reason}</name>
+ <fsummary>Writes a file.</fsummary>
+ <type>
+ <v>ChannelPid = pid()</v>
+ <v>File = string()</v>
+ <v>Iolist = iolist()</v>
+ <v>Timeout = timeout()</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p>Writes a file to the server, like <seealso
+ marker="kernel:file#write_file-2">file:write_file/2</seealso> The
+ file is created if it does not exist. The file is overwritten
+ if it exists.</p>
+ </desc>
+ </func>
+
<func>
<name>write_file_info(ChannelPid, Name, Info) -></name>
<name>write_file_info(ChannelPid, Name, Info, Timeout) -> ok | {error, Reason}</name>
@@ -647,11 +649,11 @@
</type>
<desc>
<p>Writes file information from a <c><![CDATA[file_info]]></c> record to the
- file specified by <c><![CDATA[Name]]></c>, like
- <seealso marker="kernel:file#write_file_info/2">file:write_file_info/[2,3]</seealso></p>
+ file specified by <c><![CDATA[Name]]></c>, like
+ <seealso marker="kernel:file#write_file_info-2">file:write_file_info/[2,3]</seealso></p>
</desc>
</func>
</funcs>
-
+
</erlref>