Table of Contents

Class FtpDllWrapper

Namespace
SunamoFtp.FtpClients
Assembly
SunamoFtp.dll

Wrapper around Ftp.dll library FTP client

public class FtpDllWrapper : FtpBaseNew, IDisposable
Inheritance
FtpDllWrapper
Implements
Inherited Members
Extension Methods

Constructors

FtpDllWrapper(Ftp)

Initializes wrapper with Ftp.dll client instance

public FtpDllWrapper(Ftp ftp)

Parameters

ftp Ftp

Ftp.dll client to wrap

Fields

Client

Underlying Ftp.dll client instance

public Ftp Client

Field Value

Ftp

Methods

ChdirLite(string)

Changes current directory on FTP server (lightweight version)

public override void ChdirLite(string directoryName)

Parameters

directoryName string

Directory name to change to

Connect()

Connects to FTP server (not implemented)

public override void Connect()

CreateDirectoryIfNotExists(string)

Creates a directory on FTP server if it doesn't already exist

public override void CreateDirectoryIfNotExists(string directoryName)

Parameters

directoryName string

Directory name to create

DebugActualFolder()

Debug output for current folder path

public override void DebugActualFolder()

DebugAllEntries()

public override void DebugAllEntries()

DebugDirChmod(string)

public override void DebugDirChmod(string directoryName)

Parameters

directoryName string

DeleteRecursively(List<string>, string, int, List<DirectoriesToDeleteFtp>)

Recursively deletes directories and their contents from FTP server

public override void DeleteRecursively(List<string> foldersToSkip, string directoryName, int i, List<DirectoriesToDeleteFtp> directoriesToDelete)

Parameters

foldersToSkip List<string>

List of folder names to skip during deletion

directoryName string

Root directory name to start deletion from

i int
directoriesToDelete List<DirectoriesToDeleteFtp>

List to collect directories marked for deletion

DeleteRemoteFile(string)

Deletes a file from the FTP server

public override bool DeleteRemoteFile(string fileName)

Parameters

fileName string

File name to delete

Returns

bool

True if file was deleted successfully

Dispose()

Disposes FTP client resources (not implemented)

public override void Dispose()

Download(string, string, bool)

Downloads a file from FTP server to local filesystem

public override bool Download(string remFileName, string locFileName, bool deleteLocalIfExists)

Parameters

remFileName string

Remote file name on FTP server

locFileName string

Local file path to save to

deleteLocalIfExists bool

Returns

bool

True if download was successful

GetFSEntriesListRecursively(List<string>)

Recursively gets all filesystem entries (files and directories) from FTP server

public override Dictionary<string, List<string>> GetFSEntriesListRecursively(List<string> foldersToSkip)

Parameters

foldersToSkip List<string>

List of folder names to skip during traversal

Returns

Dictionary<string, List<string>>

Dictionary mapping directory paths to lists of entry names

GetFileSize(string)

Gets the size of a file on the FTP server

public override long GetFileSize(string filename)

Parameters

filename string

File name to get size for

Returns

long

File size in bytes

GoToPath(string)

Navigates to specified path on FTP server

public override void GoToPath(string remoteFolder)

Parameters

remoteFolder string

Remote folder path to navigate to

GoToUpFolder()

Navigates to parent folder on FTP server with validation

public override void GoToUpFolder()

GoToUpFolderForce()

Navigates to parent folder on FTP server (forced, no validation)

public override void GoToUpFolderForce()

ListDirectoryDetails()

Lists all entries (files and directories) in current FTP directory with details

public override List<string> ListDirectoryDetails()

Returns

List<string>

List of directory entry details

LoginIfIsNot(bool)

Performs login to FTP server if not already logged in

public override void LoginIfIsNot(bool isInitialLogin)

Parameters

isInitialLogin bool

Indicates if this is initial startup login

Mkdir(string)

Creates a directory on the FTP server

public override bool Mkdir(string directoryName)

Parameters

directoryName string

Directory name to create

Returns

bool

True if directory was created successfully

RenameRemoteFile(string, string)

Renames a file on the FTP server

public override void RenameRemoteFile(string oldFileName, string newFileName)

Parameters

oldFileName string

Current file name

newFileName string

New file name

Rmdir(List<string>, string)

Removes a directory from the FTP server

public override bool Rmdir(List<string> foldersToSkip, string directoryName)

Parameters

foldersToSkip List<string>

List of folder names to skip during deletion

directoryName string

Directory name to remove

Returns

bool

True if directory was removed successfully

UploadFile(string)

Uploads file to FTP server (not implemented)

public override Task UploadFile(string path)

Parameters

path string

File path to upload

Returns

Task

WriteDebugLog(string, string, params object[])

Debug output method for logging FTP operations

public override void WriteDebugLog(string context, string text, params object[] args)

Parameters

context string

Operation or context identifier

text string

Message format string

args object[]

Format arguments