EOF check 
Author Message
 EOF check

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.*-*-*.com/


Quote:
> 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



Mon, 11 Apr 2005 22:18:01 GMT  
 EOF check
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



Mon, 11 Apr 2005 22:10:18 GMT  
 EOF check
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

Quote:
>-----Original Message-----
>uzi, what class are you using in the IO namespace?  If

you are using a Read
Quote:
>method on one of the stream classes many of them return

a 0 or -1 at the end
Quote:
>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

>.



Mon, 11 Apr 2005 23:31:00 GMT  
 EOF check
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

> >.



Tue, 12 Apr 2005 00:09:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. infinite loop due to EOF checking

2. effective EOF check

3. EOF file checking for Txt file

4. How to check for EOF after fgets

5. When Is EOF not EOF?

6. Find eof without using EOF

7. EOF or not EOF

8. /checked and Checked conversions of basic types!

9. Checking the Check Box Status in Viusal C++

10. Check box in dialog won't stay checked

11. checking parent item check-box in a CTreeView->how to check all children automatically afterwards?

12. Detecting EOF

 

 
Powered by phpBB® Forum Software