RE: Checking file integrity
- Posted by rforno at tutopia.com Apr 23, 2003
- 397 views
----- Original Message ----- From: Robert Craig <rds at RapidEuphoria.com> Subject: Re: Checking file integrity > x > x > rforno at tutopia.com wrote: > > Wouldn't be it possible for Euphoria to return an error report in such a > > case, for example with a negative number different from -1 (EOF)? > > Maybe I'm wrong, but I think the OS has a variable called errno (under C) > > that can be accessed by the user. Couldn't it be used to that end? > > I'm not aware of any test that I could make that would > detect an error on the disk media. Even if there were > such a test, would it be worth wasting a couple of machine > cycles on *every* byte read by *every* program? > Of course I didn't think of checking every byte. I think the disk driver maybe checks parity, or CRC. > I believe that each disk sector has a checksum on it. > Perhaps your "Nero" program sees if the checksum is correct. > I also think so. Would it be possible for Euphoria to access this information? > I would have thought that the O/S would complain loudly > if a sector were bad (i.e. bad checksum). > So did I (this was what I expected from the first version of my program, as you pointed out), but apparently this didn't happen. I am going to perform some experiments on this subject. Regards. > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > > > > TOPICA - Start your own email discussion group. FREE! > >