From 42a916716671d6f553f5c25d8a8c98d34a7f1da5 Mon Sep 17 00:00:00 2001
From: Hans Nilsson
Type definitions that are used more than once in this module, - or abstractions to indicate the intended use of the data type, or both: -
- -=
- The
+ A description of the reason why an operation failed. The The The The Specifies the encryption or decryption applied to tar files when using
+ The encryption or decryption is applied to the generated stream of
+ bytes prior to sending the resulting stream to the SFTP server.
+ For code examples see Section
+
The
If the selected cipher needs to have the input data partioned into
+ blocks of a certain size, the
=
The initial
If the
If the request functions for the SFTP channel return
The request may have reached the server and may have been performed. - However, no answer was received from the server within the expected time.
-If doing encryption,
+ the
The
The
Reads from an open file, without waiting for the result. If the
handle is valid, the function returns
Writes to an open file, without waiting for the result. If the
handle is valid, the function returns
Closes a handle to an open file or directory on the server.
Deletes the file specified by
Deletes a directory specified by
Lists the given directory on the server, returning the filenames as a list of strings.
@@ -221,14 +221,9 @@Creates a directory specified by
Creates a symbolic link pointing to
Opens a file on the server and returns a handle, which can be used for reading or writing.
Opens a handle to a directory on the server. The handle can be used for reading directory contents.
@@ -285,72 +262,36 @@Opens a handle to a tar file on the server, associated with
For code exampel see Section
-
The
The
For code examples see Section
+
The
The
Sets the file position of the file referenced by
The
The
Reads
Reads a file from the server, and returns the data in a binary.
Returns a
Depending on the underlying OS:es links might be followed and info on the final file, directory
- etc is returned. See
Reads the link target from the symbolic link specified by
Returns a
Renames a file named
Stops an SFTP channel. Does not close the SSH connection.
Use
Writes
Writes a file to the server. The file is created if it does not exist but overwritten if it exists.
@@ -641,15 +513,9 @@Writes file information from a Example of writing and then reading a tar file follows: This is an example of writing and then reading a tar file: The previous write and read example can be extended with encryption and decryption as follows: The previous
{ok,HandleWrite} = ssh_sftp:open_tar(ChannelPid, ?tar_file_name, [write]),
ok = erl_tar:add(HandleWrite, .... ),
@@ -248,8 +249,12 @@
{ok,NameValueList} = erl_tar:extract(HandleRead,[memory]),
ok = erl_tar:close(HandleRead),
+
%% First three parameters depending on which crypto type we select:
Key = <<"This is a 256 bit key. abcdefghi">>,
@@ -297,6 +302,7 @@ Cr = {InitFun,DecryptFun},
ok = erl_tar:close(HandleRead),