Class FtpProgress
- Namespace
- FluentFTP
- Assembly
- FluentFTP.dll
Class to report FTP file transfer progress during upload or download of files
public class FtpProgress
- Inheritance
-
FtpProgress
- Inherited Members
- Extension Methods
Constructors
FtpProgress(double, long, double, TimeSpan, string, string, FtpProgress)
Create a new FtpProgress object for individual file transfer progress.
public FtpProgress(double progress, long bytesTransferred, double transferspeed, TimeSpan remainingtime, string localPath, string remotePath, FtpProgress metaProgress)
Parameters
progress
doublebytesTransferred
longtransferspeed
doubleremainingtime
TimeSpanlocalPath
stringremotePath
stringmetaProgress
FtpProgress
FtpProgress(int, int)
Create a new FtpProgress object for meta progress info.
public FtpProgress(int fileCount, int fileIndex)
Parameters
Properties
ETA
A value representing the calculated 'Estimated time of arrival'. Used to track the progress of an individual file transfer.
public TimeSpan ETA { get; set; }
Property Value
FileCount
Stores the total count of the files to be transferred. Only used when transferring multiple files or an entire directory.
public int FileCount { get; set; }
Property Value
FileIndex
Stores the index of the file in the listing. Only used when transferring multiple files or an entire directory.
public int FileIndex { get; set; }
Property Value
LocalPath
Stores the absolute local path of the current file being transferred.
public string LocalPath { get; set; }
Property Value
Progress
A value between 0-100 indicating percentage complete, or -1 for indeterminate. Used to track the progress of an individual file transfer.
public double Progress { get; set; }
Property Value
RemotePath
Stores the absolute remote path of the current file being transferred.
public string RemotePath { get; set; }
Property Value
TransferSpeed
A value representing the current Transfer Speed in Bytes per seconds. Used to track the progress of an individual file transfer.
public double TransferSpeed { get; set; }
Property Value
TransferredBytes
A value indicating how many bytes have been transferred. When unable to calculate percentage, having the partial byte count may help in providing some feedback.
public long TransferredBytes { get; set; }
Property Value
Methods
Generate(long, long, long, TimeSpan, string, string, FtpProgress)
Create a new FtpProgress object for a file transfer and calculate the ETA, Percentage and Transfer Speed.
public static FtpProgress Generate(long fileSize, long position, long bytesProcessed, TimeSpan elapsedtime, string localPath, string remotePath, FtpProgress metaProgress)
Parameters
fileSize
longposition
longbytesProcessed
longelapsedtime
TimeSpanlocalPath
stringremotePath
stringmetaProgress
FtpProgress
Returns
TransferSpeedToString()
Convert Transfer Speed (bytes per second) in human readable format
public string TransferSpeedToString()