Re: Re: Read File Problems
Re: Re: Read File Problems
- Subject: Re: Re: Read File Problems
- From: email@hidden
- Date: Tue, 20 Mar 2001 01:42:58 EST
In a message dated 3/20/01 12:09:30 AM, Paul Berkowitz wrote:
>
I meant to ask a few days ago, when you pointed out that you don't need to
>
open for access a file just to read it. Is that fairly new, or has it always
>
been the case? You can even use all the various read parameters such 'for',
>
from' 'until', 'using delimiter', etc, without opening for access. You don't
>
need to open for access to get eof of a file either, in spite of what
>
Standard Additions dictionary says.
>
>
So -- what's the point of the 'write permission' parameter, if the _only_
>
thing you need to open for access for is to write to the file? If you can
>
read it and get eof without opening it for access, you actually only need to
>
open it in order to write to it, so why the special parameter 'with write
>
permission'?
One problem with directly using read without first using open for access is
that open for access creates the file if it does not exist, whereas read
alone throws an error if the file does not exist. This is very helpful, since
verifying the existence of a file and/or creating a file thru the Finder is
painfully slow. Additionally, this feature means less coding and error
trapping.
Jeff Baumann
email@hidden
www.linkedresources.com
Friends don't let friends email high ASCII.