Overview
Comment: | Don't define methods unavailable on Windows. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c9e9ea561cd86feaf16e08d5517c7012 |
User & Date: | js on 2010-01-30 14:26:42 |
Other Links: | manifest | tags |
Context
2010-01-30
| ||
15:47 | Make OFEnumerator more general, implement it for OFArray & OFDictionary. check-in: daae7ffbf3 user: js tags: trunk | |
14:26 | Don't define methods unavailable on Windows. check-in: c9e9ea561c user: js tags: trunk | |
14:14 | Fix missing includes and typos. check-in: 35f59c61c6 user: js tags: trunk | |
Changes
Modified src/OFExceptions.h from [da2deb8e90] to [84921b5752].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + - - + + | /* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #include <sys/stat.h> |
︙ | |||
374 375 376 377 378 379 380 381 382 383 384 385 386 387 | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | + | /** * \return The new mode for the file */ - (mode_t)mode; @end #ifndef _WIN32 /** * An OFException indicating that changing the owner of the file failed. */ @interface OFChangeFileOwnerFailedException: OFException { OFString *path; uid_t owner; |
︙ | |||
431 432 433 434 435 436 437 438 439 440 441 442 443 444 | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | + | - (uid_t)owner; /** * \return The new group for the file */ - (gid_t)group; @end #endif /** * An OFException indicating that renaming a file failed. */ @interface OFRenameFileFailedException: OFException { OFString *from; |
︙ | |||
518 519 520 521 522 523 524 525 526 527 528 529 530 531 | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | + | /** * \return The path of the file */ - (OFString*)path; @end #ifndef _WIN32 /** * An OFException indicating that creating a link failed. */ @interface OFLinkFailedException: OFException { OFString *src; OFString *dest; |
︙ | |||
613 614 615 616 617 618 619 620 621 622 623 624 625 626 | 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 | + | - (OFString*)source; /** * \return A string of the destination for the symlink */ - (OFString*)destination; @end #endif /** * An OFException indicating that setting an option failed. */ @interface OFSetOptionFailedException: OFException {} @end |
︙ |
Modified src/OFExceptions.m from [cfd5cb5ad9] to [ad416c1918].
︙ | |||
547 548 549 550 551 552 553 554 555 556 557 558 559 560 | 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | + | - (mode_t)mode { return mode; } @end #ifndef _WIN32 @implementation OFChangeFileOwnerFailedException + newWithClass: (Class)class__ path: (OFString*)path_ owner: (uid_t)owner_ group: (gid_t)group_ { return [[self alloc] initWithClass: class__ |
︙ | |||
619 620 621 622 623 624 625 626 627 628 629 630 631 632 | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | + | } - (gid_t)group { return group; } @end #endif @implementation OFRenameFileFailedException + newWithClass: (Class)class__ from: (OFString*)from_ to: (OFString*)to_ { return [[self alloc] initWithClass: class__ |
︙ | |||
740 741 742 743 744 745 746 747 748 749 750 751 752 753 | 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 | + | - (OFString*)path { return path; } @end #ifndef _WIN32 @implementation OFLinkFailedException + newWithClass: (Class)class__ source: (OFString*)src_ destination: (OFString*)dest_ { return [[self alloc] initWithClass: class__ source: src_ |
︙ | |||
869 870 871 872 873 874 875 876 877 878 879 880 881 882 | 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 | + | } - (OFString*)destination { return dest; } @end #endif @implementation OFSetOptionFailedException - (OFString*)string { if (string != nil) return string; |
︙ |
Modified src/OFFile.h from [d8183f3c38] to [4c7924139a].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - - - - - | /* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #include <stdio.h> |
︙ | |||
45 46 47 48 49 50 51 | 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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - + + + + | * \return A new autoreleased OFFile */ + fileWithFilePointer: (FILE*)fp; /** * Changes the mode of a file. * |
︙ | |||
105 106 107 108 109 110 111 112 113 114 115 116 117 118 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | + | * Not available on Windows. * * \param src The path to the file of which should be symlinked as a string * \param dest The path to where the file should be symlinked as a string */ + (void)symlink: (OFString*)src to: (OFString*)dest; #endif /** * Initializes an already allocated OFFile. * * \param path The path to the file to open as a string * \param mode The mode in which the file should be opened as a string * \return An initialized OFFile |
︙ |
Modified src/OFFile.m from [cfa00f6d8b] to [95e5eb4c36].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - - + | #include "config.h" #include <stdio.h> #include <string.h> #include <unistd.h> |
︙ | |||
79 80 81 82 83 84 85 86 87 88 89 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | + - - - - - + | if (!SetFileAttributes([path cString], attrs)) @throw [OFChangeFileModeFailedException newWithClass: self path: path mode: mode]; #endif } #ifndef _WIN32 + (void)changeOwnerOfFile: (OFString*)path toOwner: (uid_t)owner group: (gid_t)group { |
︙ | |||
119 120 121 122 123 124 125 126 127 128 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | + - - - - - - - - - - + | #else if (!DeleteFile([path cString])) #endif @throw [OFDeleteFileFailedException newWithClass: self path: path]; } #ifndef _WIN32 + (void)link: (OFString*)src to: (OFString*)dest { |
︙ |