Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

appending text to files



I posted this to comp.lang.objective-c and got no response so i'm going to ask here (and probably get nailed for asking)

in NSString.h, i see the following line
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;

i need to append a NSMutableString to a file that already exists.  is there any built-in method to do this?


i currently have this if (isLogging) { NSMutableString *mystring1 = [[[NSMutableString alloc] init] autorelease]; if ([logString length] > 0) { [mystring1 setString: [NSString stringWithContentsOfFile: logFileName]]; [mystring1 appendString: logString]; [logString setString: @""]; [mystring1 writeToFile: logFileName atomically: NO]; } }

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.