• 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: Issue with read/write to NSFileHandle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue with read/write to NSFileHandle


  • Subject: Re: Issue with read/write to NSFileHandle
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 30 Jun 2016 20:37:38 -0500

On Jun 30, 2016, at 8:17 PM, Graham Cox <email@hidden> wrote:
>
> What still seems a bit unclear is what a file handle “for update” is meant for, if separate read and write handles are needed.

You can use a single file handle for both reading and writing.  It's just that you will have to seek around to read and write where you want.  If you just keep writing to the end of the file and reading from the current position, the reads will always get just end-of-file.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Issue with read/write to NSFileHandle (From: Graham Cox <email@hidden>)
 >Re: Issue with read/write to NSFileHandle (From: Jens Alfke <email@hidden>)
 >Re: Issue with read/write to NSFileHandle (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Issue with read/write to NSFileHandle
  • Previous by thread: Re: Issue with read/write to NSFileHandle
  • Next by thread: Why can't Swift instance methods call class methods without qualification?
  • Index(es):
    • Date
    • Thread