CakeSFTP.

SFTPListAllFiles(ICakeContext, SFTPSettings, string) Method

Summary

Gets all files from the SFTP server
Assembly
Cake.SFTP.dll
Namespace
Cake.SFTP
Containing Type
CakeSFTP

Syntax

public static IEnumerable<string> SFTPListAllFiles(this ICakeContext cakecontext, SFTPSettings settings, string remoteDirectory = ".")

Examples

var remotefiles = SFTPListAllFiles(settings, "uploads/current");

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
cakecontext ICakeContext The context.
settings SFTPSettings The settings file for the SFTP server.
remoteDirectory string The folder on the SFTP server where you want to get the contents from.

Return Value

Type Description
IEnumerable<string> A list of the files on the server.