Re: accessing files larger than 2GB
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.