• 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
to write to file except NSData*
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

to write to file except NSData*


  • Subject: to write to file except NSData*
  • From: Nick Rogers <email@hidden>
  • Date: Tue, 15 Apr 2008 20:08:28 +0530

Hi,
I am creating a file with:
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager createFileAtPath:path contents:nil attributes:nil];
===========
then I got a fileHandle as:
NSFileHandle *fileHandle = [NSFileHandle fileHandleForWritingAtPath:path];
===========
NSFileHandle has the method:
- (void)writeData:(NSData *)data


=====================

but i want to write the length of (NSData *)data, before I write it to file because I will be writing a lot of NSData to the file,
so that I will be able to read the length first and then read the following NSData.
SO how can I write the length which is an integer to file before I write the NSData.


Thanks,
Nick

_______________________________________________

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


  • Follow-Ups:
    • Re: to write to file except NSData*
      • From: Jeff LaMarche <email@hidden>
    • Re: to write to file except NSData*
      • From: Thomas Backman <email@hidden>
  • Prev by Date: RE: is this badly written code?
  • Next by Date: Re: to write to file except NSData*
  • Previous by thread: Re: Inline Help Text Approaches
  • Next by thread: Re: to write to file except NSData*
  • Index(es):
    • Date
    • Thread