• 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: accessing files larger than 2GB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessing files larger than 2GB


  • Subject: Re: accessing files larger than 2GB
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Tue, 8 Jul 2003 10:10:16 +0100

On Tuesday, July 8, 2003, at 12:05 am, Jeff Harrell wrote:

On Monday, July 7, 2003, at 05:52 PM, Chris Meyer wrote:

Is there a preferred way in Cocoa to access the data of files larger than 2GB? I need to read blocks and write blocks into the files. The only option I see is to use Carbon API's. Anyone know of another (better/more current) way?

You don't need to do anything special. NSFileHandle's -seekToFileOffset method takes an unsigned long long argument. That's a 64-bit integer. In theory, you can address up to 18 billion gigs this way.

Equally if you're using the C library functions rather than NSFileHandle, you'll find that lseek(), fseeko() and ftello() all support 64-bit offsets (off_t is 64 bits on Mac OS X).

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: accessing files larger than 2GB (From: Jeff Harrell <email@hidden>)

  • Prev by Date: Re: ScreenSaver cleanup
  • Next by Date: Re: 15Hz sine wave
  • Previous by thread: Re: accessing files larger than 2GB
  • Next by thread: Re: accessing files larger than 2GB
  • Index(es):
    • Date
    • Thread