title: Get file size from SFTP using SharpSSH
body: <p>I'm uploading a zip file from local directory to SFTP using SharpSSH. Everything works fine.
  However, I would like to get the file size of the current file I just uploaded. The reason I'm doing this is that the zip file is big (from 45 GB to 80 GB) and I want to make sure that during the upload it didn't fail or stuck. Want to make sure the entire zip is uploaded.</p>
  
  <p>I can get the file size of the local zip file like this:</p>
  
  <pre><code>DirectoryInfo di = new DirectoryInfo(yesterdaysArchiveFolder);
  FileInfo[] files = di.GetFiles();
  
  foreach (FileInfo f in files)
  {
     Console.WriteLine("Size of the zip file: " + f.Length);
  }
  </code></pre>
  
  <p>Now, I want to do the same thing for the file I just uploaded to SFTP after the upload is complete.</p>
  
  <p>Since I know the name of the file I just uploaded I create an <code>ArrayList</code> and put the files from SFTP. I then use <code>for loop</code> to get the file I just uploaded.</p>
  
  <pre><code>ArrayList FileList = oSftp.GetFileList(_ftpDirectory);
  int count = FileList.Count;
  Console.WriteLine("Files in SFTP: " + count);
  
  for (int i = 0; i &lt; FileList.Count; i++)
  {
       if (zipFileName == FileList[i].ToString())
       {
         Console.WriteLine(FileList[i]);          
       }
  }
  </code></pre>
  
  <p>The problem is that there're no properties like <code>.Length</code> to get the file size of that file?</p>
  
  <p>Is there another approach I can take to find out the file size of the file in remote server?</p>