The Case Of The Unreadable File
Ray G. Miller
rgmiller at pacbell.net
Fri Feb 7 14:50:02 EST 2003
From: Yennie at aol.com
>>
> What kind of value do you get for "increment" in your script by the time you
> get an error in "the result"?
The "increment" value is "8256" on a file that the Finder lists as
184,358 bytes.
The time it takes is about 1800 ticks. On a valid file its about 20-30 ticks.
It looks like MC is a "I'm-Not-Gonna-Give-Up" loop when it encounters a
read error. Seems like it should jump out as soon as it encounters a
read error....
A couple of times MC DID return a "Can't read" error... but not consistently.
> Is it larger than the supposed file size returned by the detailed files()?
Don't know, but I'll check the results of detailed Files() vs. the finder.
> Here's one idea if it is:
>
> function isValid theFile, fileSize
> open file theFile for read
> read from file theFile for 1 at (fileSize+1)
> put (the result = "eof") into vBool
> close file theFile
> return vBool
> end isValid
>
Looks good. I'll try it.
> I tested a variation here, and it works for valid files. Dunno if it helps
> any with your invalid ones- that might be hardwired underneath into whatever
> system file routine is returning the error.
>
Thanks your help.
Ray
--
Ray G. Miller
-----------
Turtlelips Productions
4009 Everett Ave.
Oakland, CA 94602
MailTo:rgmiller at pacbell.net
(V) 510.530.1971
(F) 510.482.3491
More information about the metacard
mailing list