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
ftpFtpFtp.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
directoryNamestringDirectory 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
directoryNamestringDirectory 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
directoryNamestring
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
foldersToSkipList<string>List of folder names to skip during deletion
directoryNamestringRoot directory name to start deletion from
iintdirectoriesToDeleteList<DirectoriesToDeleteFtp>List to collect directories marked for deletion
DeleteRemoteFile(string)
Deletes a file from the FTP server
public override bool DeleteRemoteFile(string fileName)
Parameters
fileNamestringFile 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
remFileNamestringRemote file name on FTP server
locFileNamestringLocal file path to save to
deleteLocalIfExistsbool
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
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
filenamestringFile 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
remoteFolderstringRemote 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
LoginIfIsNot(bool)
Performs login to FTP server if not already logged in
public override void LoginIfIsNot(bool isInitialLogin)
Parameters
isInitialLoginboolIndicates if this is initial startup login
Mkdir(string)
Creates a directory on the FTP server
public override bool Mkdir(string directoryName)
Parameters
directoryNamestringDirectory 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
Rmdir(List<string>, string)
Removes a directory from the FTP server
public override bool Rmdir(List<string> foldersToSkip, string directoryName)
Parameters
foldersToSkipList<string>List of folder names to skip during deletion
directoryNamestringDirectory 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
pathstringFile path to upload
Returns
WriteDebugLog(string, string, params object[])
Debug output method for logging FTP operations
public override void WriteDebugLog(string context, string text, params object[] args)