#include <OOXMLExtensions.h>
Definition at line 36 of file OOXMLExtensions.h.
◆ writeOOXMLToFile:atomically:errorDescription:
| - (BOOL) writeOOXMLToFile: |
|
(NSString*) | path |
| atomically: |
|
(BOOL) | flag |
| errorDescription: |
|
(NSString**) | outErrorDesc |
Definition at line 29 of file OOXMLExtensions.m.
29 :(NSString*)path atomically:(BOOL)flag errorDescription:(NSString**)outErrorDesc
30{
32 NSString* errorDesc =
nil;
33
34 data = [NSPropertyListSerialization dataFromPropertyList:self format:NSPropertyListXMLFormat_v1_0 errorDescription:outErrorDesc];
36 if (outErrorDesc != NULL) {
37 *outErrorDesc = [NSString stringWithFormat:@"could not convert property list to XML: %@", errorDesc];
38 }
39#if OOLITE_RELEASE_PLIST_ERROR_STRINGS
40 [errorDesc release];
41#endif
42 return NO;
43 }
44
45 if (![data writeToFile:path atomically:YES]) {
46 if (outErrorDesc != NULL) {
47 *outErrorDesc = [NSString stringWithFormat:@"could not write data to %@.", path];
48 }
49 return NO;
50 }
51
52 return YES;
53}
References nil.
The documentation for this category was generated from the following files: