sftpDirectoryExists: sftpDownload

Description Usage Details Value Note Author(s) References See Also Examples

Description

Downloads a file from an ftp server.

Usage

1
sftpDownload(host, username, password, remotepath, localpath)

Details

Downloads a file from an ftp server. Will overwrite an existing file at the specified 'localpath'.

Value

logical: returns TRUE if successful, FALSE otherwise

Note

The underlying C code supports public key authentication but this version of Rssh2 supports only username+password authentication.

Author(s)

Bruce Hoff <bruce.hoff@sagebase.org>

References

www.libssh2.org

See Also

sftpUpload sftpDownload sftpDirectoryExists sftpMakeDirectory sftpRemoveDirectory

Examples

1
2
3
4
## Not run: 
sftpDownload("sftp.server.org", "username", "password", "/path/to/source/remotefile.txt", "/dest/location/localfile.txt")

## End(Not run)

brucehoff/Rssh2 documentation built on May 13, 2019, 7:54 a.m.