This project is read-only.

FileExists perfromance issue


Hi, could you please use SIZE ftp command in case SIZE feature is supported by FTP server? Now you use GetListing and it's works very slow because every time new data connection creates:
    public bool FileExists(string path, FtpListOption options)
      string ftpDirectoryName = path.GetFtpDirectoryName();
      lock (this.m_lock)
        if (!this.DirectoryExists(ftpDirectoryName))
          return false;
        foreach (FtpListItem ftpListItem in this.GetListing(ftpDirectoryName, options))
          if (ftpListItem.Type == FtpFileSystemObjectType.File && ftpListItem.Name == path.GetFtpFileName())
            return true;
      return false;


geotarget wrote Jul 28 at 9:35 AM

What an idiot you are. Read the big notice on the homepage. Use FluentFTP. All these issues have already been fixed.

ww8987 wrote Jul 28 at 11:52 AM

The idiot is the person who say that word to an another unknown person.
Thanks for the redirect. Google can't match FluentFTP and System.Net.FtpClient...