public long GetFileSize(string filename)
{
Connect();
SendCommand("SIZE " + filename);
ReadResponse();
if (response != 213)
{
#if (FTP_DEBUG)
Console.Write("\r" + responseStr);
#endif
throw new Exception(responseStr);
}
return Int64.Parse(responseStr.Substring(4));
}
public void OpenUpload(string filename, string remote_filename, bool resume = false)