• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Read File Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read File Problems


  • Subject: Re: Read File Problems
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 20 Mar 2001 20:54:33 +1100

On 20/3/01 8:37 PM +1000, Nigel Garvey, email@hidden, wrote:

> My own investigation into this sort of thing last year suggests that a
> "simple read" - like a read by file specification after opening for
> access - first checks whether there's an open-file reference for that
> file. If there is, it uses it; if not, it opens the file itself. The
> reference for a freshly opened file has its file pointer set for the
> beginning of the file, but a reference that has already been read or
> written to will have the pointer set somewhere else. This means that if
> the file is already open - either because it's in use or because some
> previous error has prevented it from closing - a simple read has a good
> chance of not getting the expected results. You can get round this using
> the 'from' and 'to' parameters, but then you screw up the file pointer
> for whatever process opened the file in the first place - which may not
> be the current script.

Makes sense, thanks.

--
Shane Stanley, email@hidden


References: 
 >Re: Read File Problems (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Read File Problems
  • Next by Date: Re: QuarkXPress: finding anchored boxes
  • Previous by thread: Re: Read File Problems
  • Next by thread: Re: Read File Problems
  • Index(es):
    • Date
    • Thread