CakeSFTP.

SFTPUploadFile(ICakeContext, SFTPSettings, string, string) Method

Summary

Uploads a file to the SFTP server
Assembly
Cake.SFTP.dll
Namespace
Cake.SFTP
Containing Type
CakeSFTP

Syntax

public static void SFTPUploadFile(this ICakeContext cakecontext, SFTPSettings settings, string localFilePath, string remoteFilePath)

Examples

var settings = new SFTPSettings
{
    UserName = "someUserName",
    Password = "somePassword",
    Host = "192.168.1.100",
    Port = 22
};
SFTPUploadFile(settings, "./somefile.txt", "/uploads/somefile.txt");

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
cakecontext ICakeContext The context.
settings SFTPSettings The settings file for the SFTP server.
localFilePath string The path to the local file you want to upload.
remoteFilePath string The folder on the SFTP server where you want to upload the file, including the remote filename.

Return Value

Type Description
void