equal
deleted
inserted
replaced
33 |
33 |
34 [os release]; |
34 [os release]; |
35 return YES; |
35 return YES; |
36 } |
36 } |
37 |
37 |
|
38 -(BOOL) appendToFile:(NSString *)path usingStream:(NSOutputStream *)os { |
|
39 NSData *allData = [self dataUsingEncoding:NSUTF8StringEncoding]; |
|
40 [os write:[allData bytes] maxLength:[allData length]]; |
|
41 return YES; |
|
42 } |
38 |
43 |
39 // by http://iphonedevelopment.blogspot.com/2010/08/nsstring-appendtofileusingencoding.html |
44 // by http://iphonedevelopment.blogspot.com/2010/08/nsstring-appendtofileusingencoding.html |
40 -(BOOL) appendToFile:(NSString *)path usingEncoding:(NSStringEncoding) encoding { |
45 -(BOOL) appendToFile:(NSString *)path usingEncoding:(NSStringEncoding) encoding { |
41 NSFileHandle *fh = [NSFileHandle fileHandleForWritingAtPath:path]; |
46 NSFileHandle *fh = [NSFileHandle fileHandleForWritingAtPath:path]; |
42 if (fh == nil) |
47 if (fh == nil) |