Differences From Artifact [e5c693e728]:
- File src/OFData.m — part of check-in [c8f7b90082] at 2017-07-22 20:50:27 on branch trunk — Split OFDataArray into OFData and OFMutableData (user: js, size: 13993) [annotate] [blame] [check-ins using]
To Artifact [504d17c5e3]:
- File
src/OFData.m
— part of check-in
[23e57c5040]
at
2017-07-22 23:04:35
on branch trunk
— OFFile: Simplify mode
This removes "b" for binary and always uses binary, as there is no good
reason to not use binary. (user: js, size: 13991) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
212 213 214 215 216 217 218 | buffer = malloc(size); if (buffer == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: size]; @try { OFFile *file = [[OFFile alloc] initWithPath: path | | | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | buffer = malloc(size); if (buffer == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: size]; @try { OFFile *file = [[OFFile alloc] initWithPath: path mode: @"r"]; @try { [file readIntoBuffer: buffer exactLength: size]; } @finally { [file release]; } |
︙ | ︙ | |||
590 591 592 593 594 595 596 | return of_base64_encode(_items, _count * _itemSize); } #ifdef OF_HAVE_FILES - (void)writeToFile: (OFString *)path { OFFile *file = [[OFFile alloc] initWithPath: path | | | 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | return of_base64_encode(_items, _count * _itemSize); } #ifdef OF_HAVE_FILES - (void)writeToFile: (OFString *)path { OFFile *file = [[OFFile alloc] initWithPath: path mode: @"w"]; @try { [file writeBuffer: _items length: _count * _itemSize]; } @finally { [file release]; } |
︙ | ︙ |