check_winscp: Check for contents via winSCP

View source: R/transfer.R

check_winscpR Documentation

Check for contents via winSCP

Description

check_winscp will connect to the secure file transfer protocol available with winSCP and check for the presence of a file with the provided pattern.

Usage

check_winscp(
  pattern = NULL,
  connection = NULL,
  rmt_path = ".",
  winscp_location = "C:/Program Files (x86)/WinSCP/winSCP.com",
  detailed_output = FALSE
)

Arguments

pattern

Character string, typically a file name or portion thereof, that will be used in the search. Default is today's date.

connection

Character string that is used to connect to the desired file system. Usually the password and username can be provided as part of the address.

rmt_path

Character string describing the file path to search in, default is the home directory ('.'). For example: sftp://USERNAME:PASSWORD@SERVERADDRESS.CA/

winscp_location

Character string, defining the location of the install location for winSCP. Default is C:/Program Files (x86)/WinSCP/winSCP.com.

detailed_output

Logical value, if set to TRUE then all the console output is provided. Default is FALSE.

Details

This function is used as part of the transfer_winscp function to ensure the file of interest is actually available for download.

Value

A logical value of whether or not the pattern was found.

Examples

## Not run: 
# Test to see if the pattern is present in the server of interest.
check_winscp(pattern = 'June_22_2020', connection = 'sftp://######:######@hostlocation.ca/',
                 rmt_path = './location', detailed_output = TRUE)

## End(Not run)


al-obrien/farrago documentation built on April 14, 2023, 6:20 p.m.