EldoS | Feel safer!

Software components for data protection, secure storage and transfer

how to determine if a file is completely uploaded?

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
Posted: 02/10/2009 13:31:24
by y song (Basic support level)
Joined: 02/10/2009
Posts: 12


I want to know if there is a method to determine if a file is completely uploaded. I write a function:
public bool isFileUpdloaded(string localPath, string remotePath)
if (Client.Active && File.Exists(localPath) && Client.FileExists(remotePath))
FileInfo fi = new FileInfo(localPath);
TElSftpFileAttributes fat = new TElSftpFileAttributes();
Client.RequestAttributes(remotePath, false, fat);
if (fi.Length == fat.Size)
return true;
return false;

I don't know IO.FileInfo.Length has the same value as TElSftpFileAttributes.size?

Posted: 02/10/2009 13:46:08
by Eugene Mayevski (EldoS Corp.)

You need to set fat.IncludedAttributes to specify that you are requesting size.

Sincerely yours
Eugene Mayevski
Posted: 02/10/2009 14:19:18
by y song (Basic support level)
Joined: 02/10/2009
Posts: 12

just add:

fat.IncludedAttributes = SBSftpCommon.__Global.saASize;

thank you
Posted: 02/10/2009 14:29:39
by Eugene Mayevski (EldoS Corp.)

Something like this

Sincerely yours
Eugene Mayevski



Topic viewed 1313 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!