Differences From Artifact [469d33eabc]:
- File src/OFFile.m — part of check-in [20a5c3d547] at 2013-06-27 09:38:30 on branch trunk — Improve OFFile API. (user: js, size: 16405) [annotate] [blame] [check-ins using]
To Artifact [0c8ee7ced6]:
- File
src/OFFile.m
— part of check-in
[f3654b5cc6]
at
2013-06-28 19:15:22
on branch trunk
— Rename methods to prevent signature conflicts.
This only affects exceptions. (user: js, size: 16449) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
65 66 67 68 69 70 71 | #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFLinkFailedException.h" #import "OFLockFailedException.h" #import "OFOpenFileFailedException.h" #import "OFOutOfMemoryException.h" #import "OFReadFailedException.h" | | | | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFLinkFailedException.h" #import "OFLockFailedException.h" #import "OFOpenFileFailedException.h" #import "OFOutOfMemoryException.h" #import "OFReadFailedException.h" #import "OFRemoveItemFailedException.h" #import "OFRenameItemFailedException.h" #import "OFSeekFailedException.h" #import "OFUnlockFailedException.h" #import "OFWriteFailedException.h" #import "autorelease.h" #import "macros.h" |
︙ | ︙ | |||
239 240 241 242 243 244 245 | #ifndef _WIN32 if (mkdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], DIR_MODE)) #else if (_wmkdir([path UTF16String])) #endif @throw [OFCreateDirectoryFailedException | | | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | #ifndef _WIN32 if (mkdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], DIR_MODE)) #else if (_wmkdir([path UTF16String])) #endif @throw [OFCreateDirectoryFailedException exceptionWithDirectoryPath: path]; } + (void)createDirectoryAtPath: (OFString*)path createParents: (bool)createParents { void *pool; OFArray *pathComponents; |
︙ | ︙ | |||
360 361 362 363 364 365 366 | { #ifndef _WIN32 if (chdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wchdir([path UTF16String])) #endif @throw [OFChangeCurrentDirectoryPathFailedException | | | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | { #ifndef _WIN32 if (chdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wchdir([path UTF16String])) #endif @throw [OFChangeCurrentDirectoryPathFailedException exceptionWithDirectoryPath: path]; } + (off_t)sizeOfFileAtPath: (OFString*)path { #ifndef _WIN32 struct stat s; |
︙ | ︙ | |||
550 551 552 553 554 555 556 | #ifndef _WIN32 if (rename([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], [destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wrename([source UTF16String], [destination UTF16String])) #endif | | | > | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | #ifndef _WIN32 if (rename([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], [destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wrename([source UTF16String], [destination UTF16String])) #endif @throw [OFRenameItemFailedException exceptionWithSourcePath: source destinationPath: destination]; objc_autoreleasePoolPop(pool); } + (void)removeItemAtPath: (OFString*)path { #ifndef _WIN32 if (remove([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wremove([path UTF16String])) #endif @throw [OFRemoveItemFailedException exceptionWithItemPath: path]; } #ifdef OF_HAVE_LINK + (void)linkItemAtPath: (OFString*)source toPath: (OFString*)destination { void *pool = objc_autoreleasePoolPush(); |
︙ | ︙ |