list_files_scp: Function to list files and directories on a remote system...

View source: R/download_with_scp.R

list_files_scpR Documentation

Function to list files and directories on a remote system with scp (secure copy).

Description

list_files_scp offers an alternative to the curl based functions which can be troublesome to use with the sftp protocol on Ubuntu systems. download_with_scp needs the sshpass system programme to be installed.

Usage

list_files_scp(
  host,
  directory_remote,
  user,
  password,
  method = "scp",
  quiet_streams = FALSE
)

Arguments

host

Host name of remote system.

directory_remote

A remote directory to list files from.

user

User name for scp.

password

Password for the user for scp.

method

Either "scp" or "rsync". Using "rsync" can be useful when the remote server does not allow scp commands.

quiet_streams

Should the system streams be suppressed?

Value

Character vector.

Author(s)

Stuart K. Grange

See Also

download_with_scp, sshpass, upload_with_scp

Examples

## Not run: 

# List contents of a directory
list_files_scp(
  host = "192.1.1.1", 
  directory_remote = "/network_storage/r_files/",
  user = "username",
  password = "password_for_username"
)


## End(Not run)


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.