Overview
Comment: | OFFileManager: Refactor -[copyItemAtURL:toURL:]
Rather than just working for file URLs, this works with any URL now. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b4835ea9b7c617b466dc6e87ed99bb2a |
User & Date: | js on 2017-12-29 16:00:47 |
Other Links: | manifest | tags |
Context
2017-12-29
| ||
21:33 | OFURLHandler: Add methods for copy and move check-in: c8defc67ad user: js tags: trunk | |
16:00 | OFFileManager: Refactor -[copyItemAtURL:toURL:] check-in: b4835ea9b7 user: js tags: trunk | |
13:38 | OFURL: Add -[URLByAppendingPathComponent:] check-in: 409a52fd05 user: js tags: trunk | |
Changes
Modified src/OFFileManager.m from [bc7b129bce] to [d50176e0c3].
︙ | |||
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 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 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | + + + + + + + + + + + - + - - - + + + - + - - - + + + - + - + - + - - - + + + - + - - - - + + + + - - + + - - + + + - - - - + + + + + - + - - - - + + + + + - + - - - + + + - - + + + - + - - + + - - - + + + - - - + + + - - - - - - - - - - - | objc_autoreleasePoolPop(pool); } - (void)copyItemAtPath: (OFString *)source toPath: (OFString *)destination { void *pool = objc_autoreleasePoolPush(); [self copyItemAtURL: [OFURL fileURLWithPath: source] toURL: [OFURL fileURLWithPath: destination]]; objc_autoreleasePoolPop(pool); } - (void)copyItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool; of_file_attributes_t attributes; of_file_type_t type; if (source == nil || destination == nil) @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); |
︙ |
Modified src/exceptions/OFCopyItemFailedException.h from [4555d3385b] to [c99df4e593].
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + + - + - + - + - - + + - - - + + + - - + + - - - + + + | * file. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN @class OFURL; /*! * @class OFCopyItemFailedException \ * OFCopyItemFailedException.h ObjFW/OFCopyItemFailedException.h * * @brief An exception indicating that copying a item failed. */ @interface OFCopyItemFailedException: OFException { |
Modified src/exceptions/OFCopyItemFailedException.m from [b180cf60f6] to [d0facaaa0d].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + - - - + + + - - - + + + - - - + + + - - + + - - + + - + | #include "config.h" #import "OFCopyItemFailedException.h" #import "OFString.h" @implementation OFCopyItemFailedException |