有时这些字节不会写入并创建空文本文件。如何检查写入的文件是否有数据。
ftp.KeepAlive = true;
ftp.UseBinary = true;
ftp.UsePassive = false;
ftp.Method = WebRequestMethods.Ftp.UploadFile;
FileStream fs = File.OpenRead(inputfilepath);
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
fs.Close();
ftpstream = ftp.GetRequestStream();
ftpstream.Write(buffer, 0, buffer.Length);
问题:此流不支持搜索操作