When getting a file from a FTP, the FTP closes the data connection and sends
a 226 reply code when the transfer is done w/o errors. And that's assuming
the FTP server has the complete file. With some file types, you can tell
when you have the complete file or not (like executables) and for others,
partial downloads will work (like most audio and video files). Other than
that, you can't use EOF to determine if you have the whole file. You'll just
have to compare it with the filesize of the file on the FTP Server.
Quote:
> Hi!
> Thanks for your reply, it doesnt matter to me what class
> to use, i need to check if the file ended correcly or
> not, it means that if EOF exist the file arrived
> completly.
> This is the best i can give you, if you have more
> question i'de be happy to give you more info.
> Uzi
> >-----Original Message-----
> >uzi, what class are you using in the IO namespace? If
> you are using a Read
> >method on one of the stream classes many of them return
> a 0 or -1 at the end
> >of a stream. Depending on what you are using you can
> use that fact to
> >determine the end of the stream. If you can give more
> details we can help
> >you with specifics.
> >--
> >Greg Ewing [MVP]
> >http://www.claritycon.com/
> >> Hi!
> >> is there a way of knowing using System.IO if an EOF
> char
> >> exist, i'm getting a file though FTP and i want to know
> >> if the whole file reached befor starting to read it.
> >> thanks,
> >> Uzi
> >.