Documentation for this section has not yet been entered.
When a response stream is returned by the FTP server, the FtpWebResponse.ContentLength property contains the number of bytes in the stream. FtpWebResponse.ContentLength returns −1 if no data was returned in the response or if the server did not send content length information. The return value is greater than or equal to zero if data was or should have been returned. For example, for requests that use the System.Net.WebRequestMethods.Ftp.ListDirectory field, the FtpWebResponse.ContentLength property always returns −1. For requests that use the System.Net.WebRequestMethods.Ftp.UploadFile method, the FtpWebResponse.ContentLength property is always zero. For requests that use the System.Net.WebRequestMethods.Ftp.DownloadFile method, the property is greater than zero if the downloaded file contained data and is zero if it was empty.
For requests that use the System.Net.WebRequestMethods.Ftp.GetFileSize method, FtpWebResponse.ContentLength returns the size of the specified file on the server.