From 2084f7e079c951fdadebe23dcff5ec247c6e0158 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 10 Oct 2012 15:27:10 +0200 Subject: ssh: Add Users Guide and enhance man pages --- lib/ssh/doc/src/ssh_sftp.xml | 60 +++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 32 deletions(-) (limited to 'lib/ssh/doc/src/ssh_sftp.xml') diff --git a/lib/ssh/doc/src/ssh_sftp.xml b/lib/ssh/doc/src/ssh_sftp.xml index c1f75461b1..28576c9ef0 100644 --- a/lib/ssh/doc/src/ssh_sftp.xml +++ b/lib/ssh/doc/src/ssh_sftp.xml @@ -1,10 +1,10 @@ - +
- 20052010 + 20052012 Ericsson AB. All Rights Reserved. @@ -22,25 +22,20 @@ ssh_sftp - Jakob Cederlund - - 1 - - + OTP 2005-09-22 - PA1 ssh_sftp.sgml
ssh_sftp SFTP client.

This module implements an SFTP (SSH FTP) client. SFTP is a - secure, encrypted file transfer service available for - SSH.

+ secure, encrypted file transfer service available for + SSH.

- COMMON DATA TYPES + DATA TYPES

Type definitions that are used more than once in this module and/or abstractions to indicate the intended use of the data type:

@@ -51,8 +46,8 @@
TIMEOUTS -

If the request functions for the sftp channel return {error, timeout} - it does not mean that the request did not reach the server and was +

If the request functions for the SFTP channel return {error, timeout} + it does not guarantee that the request did not reach the server and was not performed, it only means that we did not receive an answer from the server within the time that was expected.

@@ -64,7 +59,7 @@ start_channel(Host, Options) -> start_channel(Host, Port, Options) -> {ok, Pid} | {ok, Pid, ConnectionRef} | {error, Reason} - Starts a sftp client + Starts a SFTP client Host = string() ConnectionRef = ssh_connection_ref() @@ -73,11 +68,11 @@ Reason = term() -

If not provided, setups a ssh connection in this case a - connection reference will be returned too. A ssh channel - process is started to handle the communication with the SFTP - server, the returned pid for this process should be used as - input to all other API functions in this module.

+

If no connection reference is provided, a connection is set + up and the new connection is returned. An SSH channel process + is started to handle the communication with the SFTP server. + The returned pid for this process should be used as input to + all other API functions in this module.

Options are:

@@ -95,13 +90,13 @@ stop_channel(ChannelPid) -> ok - Stops the sftp client channel. + Stops the SFTP client channel. ChannelPid = pid() -

Stops a sftp channel. If the ssh connection should be closed - call ssh:close/1.

+

Stops an SFTP channel. Does not close the SSH connetion. + Use ssh:close/1 to close it.

@@ -133,8 +128,9 @@ Reason = term() -

Writes a file to the server, like . - The file is created if it's not there.

+

Writes a file to the server, like + . The file is created if + it does not exist or is owerwritten if it does.

@@ -169,7 +165,7 @@

Opens a file on the server, and returns a handle that - is used for reading or writing.

+ can be used for reading or writing.

@@ -184,7 +180,7 @@

Opens a handle to a directory on the server, the handle - is used for reading directory contents.

+ can be used for reading directory contents.

@@ -218,7 +214,7 @@

Reads bytes from the file referenced by - . Returns , or , or + . Returns , , or . If the file is opened with , is a binary, otherwise it is a string.

If the file is read past eof, only the remaining bytes @@ -267,9 +263,9 @@ Reason = term() -

Write to the file referenced by . +

Writes to the file referenced by . The file should be opened with or - flag. Returns if successful and + flag. Returns if successful or S otherwise.

Typical error reasons are:

@@ -317,14 +313,14 @@ ChannelPid = pid() Handle = term() Location = Offset | {bof, Offset} | {cur, Offset} | {eof, Offset} | bof | cur | eof - Offset = int() + Offset = integer() Timeout = timeout() NewPosition = integer() Reason = term()

Sets the file position of the file referenced by . - Returns (as an absolute offset) if + Returns (as an absolute offset) if successful, otherwise . is one of the following:

@@ -413,7 +409,7 @@ Reason = term() -

Read the link target from the symbolic link specified +

Reads the link target from the symbolic link specified by , like .

-- cgit v1.2.3