Differences From Artifact [d68d8af1f6]:
- File
src/OFFileManager.m
— part of check-in
[c8defc67ad]
at
2017-12-29 21:33:41
on branch trunk
— OFURLHandler: Add methods for copy and move
Also refactor OFFileManager to make use of them. (user: js, size: 21968) [annotate] [blame] [check-ins using]
To Artifact [69e30357fb]:
- File
src/OFFileManager.m
— part of check-in
[f71d8c57e2]
at
2017-12-30 19:12:01
on branch trunk
— OFFileManager: Don't use OF_KINDOF
No methods other than the ones specified in OFURLHandler are used.
Using OF_KINDOF makes this id with GCC, so that GCC then is confused
which methods was meant. (user: js, size: 21836) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
199 200 201 202 203 204 205 | objc_autoreleasePoolPop(pool); return URL; } - (of_file_attributes_t)attributesOfItemAtURL: (OFURL *)URL { | | | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | objc_autoreleasePoolPop(pool); return URL; } - (of_file_attributes_t)attributesOfItemAtURL: (OFURL *)URL { OFURLHandler *URLHandler; if (URL == nil) @throw [OFInvalidArgumentException exception]; if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; |
︙ | ︙ | |||
227 228 229 230 231 232 233 | return [ret autorelease]; } - (void)setAttributes: (of_file_attributes_t)attributes ofItemAtURL: (OFURL *)URL { | | | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | return [ret autorelease]; } - (void)setAttributes: (of_file_attributes_t)attributes ofItemAtURL: (OFURL *)URL { OFURLHandler *URLHandler; if (URL == nil) @throw [OFInvalidArgumentException exception]; if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; |
︙ | ︙ | |||
252 253 254 255 256 257 258 | ofItemAtURL: [OFURL fileURLWithPath: path]]; objc_autoreleasePoolPop(pool); } - (bool)fileExistsAtURL: (OFURL *)URL { | | | 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | ofItemAtURL: [OFURL fileURLWithPath: path]]; objc_autoreleasePoolPop(pool); } - (bool)fileExistsAtURL: (OFURL *)URL { OFURLHandler *URLHandler; if (URL == nil) @throw [OFInvalidArgumentException exception]; if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; |
︙ | ︙ | |||
277 278 279 280 281 282 283 | objc_autoreleasePoolPop(pool); return ret; } - (bool)directoryExistsAtURL: (OFURL *)URL { | | | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | objc_autoreleasePoolPop(pool); return ret; } - (bool)directoryExistsAtURL: (OFURL *)URL { OFURLHandler *URLHandler; if (URL == nil) @throw [OFInvalidArgumentException exception]; if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; |
︙ | ︙ | |||
302 303 304 305 306 307 308 | objc_autoreleasePoolPop(pool); return ret; } - (void)createDirectoryAtURL: (OFURL *)URL { | | | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | objc_autoreleasePoolPop(pool); return ret; } - (void)createDirectoryAtURL: (OFURL *)URL { OFURLHandler *URLHandler; if (URL == nil) @throw [OFInvalidArgumentException exception]; if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; |
︙ | ︙ | |||
370 371 372 373 374 375 376 | createParents: createParents]; objc_autoreleasePoolPop(pool); } - (OFArray OF_GENERIC(OFString *) *)contentsOfDirectoryAtURL: (OFURL *)URL { | | | 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | createParents: createParents]; objc_autoreleasePoolPop(pool); } - (OFArray OF_GENERIC(OFString *) *)contentsOfDirectoryAtURL: (OFURL *)URL { OFURLHandler *URLHandler; if (URL == nil) @throw [OFInvalidArgumentException exception]; if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; |
︙ | ︙ | |||
470 471 472 473 474 475 476 | objc_autoreleasePoolPop(pool); } - (void)copyItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool; | | | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | objc_autoreleasePoolPop(pool); } - (void)copyItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool; OFURLHandler *URLHandler; of_file_attributes_t attributes; of_file_type_t type; if (source == nil || destination == nil) @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); |
︙ | ︙ | |||
659 660 661 662 663 664 665 | objc_autoreleasePoolPop(pool); } - (void)moveItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool; | | | 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | objc_autoreleasePoolPop(pool); } - (void)moveItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool; OFURLHandler *URLHandler; if (source == nil || destination == nil) @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); if ((URLHandler = [OFURLHandler handlerForURL: source]) == nil) |
︙ | ︙ | |||
711 712 713 714 715 716 717 | } objc_autoreleasePoolPop(pool); } - (void)removeItemAtURL: (OFURL *)URL { | | | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | } objc_autoreleasePoolPop(pool); } - (void)removeItemAtURL: (OFURL *)URL { OFURLHandler *URLHandler; if (URL == nil) @throw [OFInvalidArgumentException exception]; if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; |
︙ | ︙ | |||
735 736 737 738 739 740 741 | objc_autoreleasePoolPop(pool); } - (void)linkItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool = objc_autoreleasePoolPush(); | | | 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | objc_autoreleasePoolPop(pool); } - (void)linkItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool = objc_autoreleasePoolPush(); OFURLHandler *URLHandler; if (source == nil || destination == nil) @throw [OFInvalidArgumentException exception]; if (![[destination scheme] isEqual: [source scheme]]) @throw [OFInvalidArgumentException exception]; |
︙ | ︙ | |||
772 773 774 775 776 777 778 | } #endif - (void)createSymbolicLinkAtURL: (OFURL *)URL withDestinationPath: (OFString *)target { void *pool = objc_autoreleasePoolPush(); | | | 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 | } #endif - (void)createSymbolicLinkAtURL: (OFURL *)URL withDestinationPath: (OFString *)target { void *pool = objc_autoreleasePoolPush(); OFURLHandler *URLHandler; if (URL == nil || target == nil) @throw [OFInvalidArgumentException exception]; URLHandler = [OFURLHandler handlerForURL: URL]; if (URLHandler == nil) |
︙ | ︙ |