ParseUnixList() static private method

Parses LIST format listings
static private ParseUnixList ( string buf, FtpCapability capabilities ) : FtpListItem
buf string A line from the listing
capabilities FtpCapability Server capabilities
return FtpListItem
 /// <summary>
 /// Gets the size of the file
 /// </summary>
 /// <param name="path">The full or relative path of the file</param>
 /// <returns>-1 if the command fails, otherwise the file size</returns>
 public override long GetFileSize(string path)
 {
     try
     {
         m_lock.WaitOne();
         Execute("TYPE I");
         // read in one line of raw file listing for the file - it's the only method to get file size
         try
         {
             using (FtpDataStream stream = OpenDataStream($"LIST {path.GetFtpPath()}", 0))
             {
                 string buf;
                 try
                 {
                     buf = stream.ReadLine(Encoding);
                     if (!string.IsNullOrWhiteSpace(buf))
                     {
                         FtpTrace.WriteLine(buf);
                         FtpListItem itemdata = FtpListItem.ParseUnixList(buf, FtpCapability.NONE);
                         return itemdata.Size;
                     }
                 }
                 finally
                 {
                     stream.Close();
                 }
             }
         }
         catch (FtpCommandException)
         {
             return 0;
         }
     }
     finally
     {
         m_lock.ReleaseMutex();
     }
     return -1;
 }