Overview
Comment: | OFURLHandler: Do not depend on OFFileManager
This fixes --disable-files. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ad3fc136ba97c658cea04dca177ef3bc |
User & Date: | js on 2018-10-21 18:54:48 |
Other Links: | manifest | tags |
Context
2018-10-27
| ||
13:01 | Do not subclass OFASN1Value check-in: b1944fd052 user: js tags: trunk | |
2018-10-21
| ||
18:54 | OFURLHandler: Do not depend on OFFileManager check-in: ad3fc136ba user: js tags: trunk | |
18:38 | configure: Add flags for arm-*-riscos* check-in: 2c423f398f user: js tags: trunk | |
Changes
Modified src/OFFileManager.h from [e4831219a2] to [167c41c369].
︙ | |||
12 13 14 15 16 17 18 | 12 13 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 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" |
︙ | |||
533 534 535 536 537 538 539 | 346 347 348 349 350 351 352 353 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * @param URL The URL to the item which should symbolically link to the target * @param target The target of the symbolic link */ - (void)createSymbolicLinkAtURL: (OFURL *)URL withDestinationPath: (OFString *)target; @end |
Modified src/OFFileManager.m from [9bd4d12514] to [cedacc51c1].
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - | #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFMoveItemFailedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFRemoveItemFailedException.h" #import "OFRetrieveItemAttributesFailedException.h" |
︙ | |||
76 77 78 79 80 81 82 | 75 76 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 103 104 105 106 107 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | extern struct ExecIFace *IExec; static struct Library *DOSBase = NULL; static struct DOSIFace *IDOS = NULL; #endif static OFFileManager *defaultManager; |
︙ | |||
834 835 836 837 838 839 840 | 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | [self createSymbolicLinkAtURL: [OFURL fileURLWithPath: path] withDestinationPath: target]; objc_autoreleasePoolPop(pool); } #endif |
︙ |
Modified src/OFString.m from [74fc8de204] to [77745cd7d6].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + + | #import "OFString.h" #import "OFString_UTF8.h" #import "OFString_UTF8+Private.h" #import "OFArray.h" #import "OFCharacterSet.h" #import "OFData.h" #import "OFDictionary.h" |
︙ |
Modified src/OFURLHandler.h from [484eef6d84] to [239befceb9].
︙ | |||
12 13 14 15 16 17 18 | 12 13 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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | + - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFDictionary.h" |
︙ | |||
221 222 223 224 225 226 227 228 229 | 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * @return True if an efficient move was performed, false if an efficient move * was not possible. Note that errors while performing a move are * reported via exceptions and not by returning false! */ - (bool)moveItemAtURL: (OFURL *)source toURL: (OFURL *)destination; @end @interface OFDictionary (FileAttributes) /*! * The @ref of_file_attribute_key_size key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) uintmax_t fileSize; /*! * The @ref of_file_attribute_key_type key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) of_file_type_t fileType; /*! * The @ref of_file_attribute_key_posix_permissions key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) uint16_t filePOSIXPermissions; /*! * The @ref of_file_attribute_key_posix_uid key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) uint32_t filePOSIXUID; /*! * The @ref of_file_attribute_key_posix_gid key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) uint32_t filePOSIXGID; /*! * The @ref of_file_attribute_key_owner key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFString *fileOwner; /*! * The @ref of_file_attribute_key_group key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFString *fileGroup; /*! * The @ref of_file_attribute_key_last_access_date key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFDate *fileLastAccessDate; /*! * The @ref of_file_attribute_key_modification_date key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFDate *fileModificationDate; /*! * The @ref of_file_attribute_key_status_change_date key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFDate *fileStatusChangeDate; /*! * The @ref of_file_attribute_key_symbolic_link_destination key from the * dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFString *fileSymbolicLinkDestination; @end OF_ASSUME_NONNULL_END |
Modified src/OFURLHandler.m from [ccdf085773] to [3c7d328cc2].
︙ | |||
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 | 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 80 81 82 83 84 85 86 87 88 89 90 91 92 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFURLHandler.h" #import "OFNumber.h" #import "OFURL.h" #ifdef OF_HAVE_THREADS # import "OFMutex.h" #endif #ifdef OF_HAVE_FILES # import "OFURLHandler_file.h" #endif #if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_THREADS) # import "OFURLHandler_HTTP.h" #endif #import "OFUndefinedKeyException.h" const of_file_attribute_key_t of_file_attribute_key_size = @"of_file_attribute_key_size"; const of_file_attribute_key_t of_file_attribute_key_type = @"of_file_attribute_key_type"; const of_file_attribute_key_t of_file_attribute_key_posix_permissions = @"of_file_attribute_key_posix_permissions"; const of_file_attribute_key_t of_file_attribute_key_posix_uid = @"of_file_attribute_key_posix_uid"; const of_file_attribute_key_t of_file_attribute_key_posix_gid = @"of_file_attribute_key_posix_gid"; const of_file_attribute_key_t of_file_attribute_key_owner = @"of_file_attribute_key_owner"; const of_file_attribute_key_t of_file_attribute_key_group = @"of_file_attribute_key_group"; const of_file_attribute_key_t of_file_attribute_key_last_access_date = @"of_file_attribute_key_last_access_date"; const of_file_attribute_key_t of_file_attribute_key_modification_date = @"of_file_attribute_key_modification_date"; const of_file_attribute_key_t of_file_attribute_key_status_change_date = @"of_file_attribute_key_status_change_date"; const of_file_attribute_key_t of_file_attribute_key_symbolic_link_destination = @"of_file_attribute_key_symbolic_link_destination"; const of_file_type_t of_file_type_regular = @"of_file_type_regular"; const of_file_type_t of_file_type_directory = @"of_file_type_directory"; const of_file_type_t of_file_type_symbolic_link = @"of_file_type_symbolic_link"; const of_file_type_t of_file_type_fifo = @"of_file_type_fifo"; const of_file_type_t of_file_type_character_special = @"of_file_type_character_special"; const of_file_type_t of_file_type_block_special = @"of_file_type_block_special"; const of_file_type_t of_file_type_socket = @"of_file_type_socket"; static OFMutableDictionary OF_GENERIC(OFString *, OFURLHandler *) *handlers; #ifdef OF_HAVE_THREADS static OFMutex *mutex; #endif static id attributeForKeyOrException(of_file_attributes_t attributes, of_file_attribute_key_t key) { id object = [attributes objectForKey: key]; if (object == nil) @throw [OFUndefinedKeyException exceptionWithObject: attributes key: key]; return object; } @implementation OFURLHandler @synthesize scheme = _scheme; + (void)initialize { if (self != [OFURLHandler class]) |
︙ | |||
191 192 193 194 195 196 197 | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | - (bool)moveItemAtURL: (OFURL *)source toURL: (OFURL *)destination { return false; } @end @implementation OFDictionary (FileAttributes) - (uintmax_t)fileSize { return [attributeForKeyOrException(self, of_file_attribute_key_size) uIntMaxValue]; } - (of_file_type_t)fileType { return attributeForKeyOrException(self, of_file_attribute_key_type); } - (uint16_t)filePOSIXPermissions { return [attributeForKeyOrException(self, of_file_attribute_key_posix_permissions) uInt16Value]; } - (uint32_t)filePOSIXUID { return [attributeForKeyOrException(self, of_file_attribute_key_posix_uid) uInt32Value]; } - (uint32_t)filePOSIXGID { return [attributeForKeyOrException(self, of_file_attribute_key_posix_gid) uInt32Value]; } - (OFString *)fileOwner { return attributeForKeyOrException(self, of_file_attribute_key_owner); } - (OFString *)fileGroup { return attributeForKeyOrException(self, of_file_attribute_key_group); } - (OFDate *)fileLastAccessDate { return attributeForKeyOrException(self, of_file_attribute_key_last_access_date); } - (OFDate *)fileModificationDate { return attributeForKeyOrException(self, of_file_attribute_key_modification_date); } - (OFDate *)fileStatusChangeDate { return attributeForKeyOrException(self, of_file_attribute_key_status_change_date); } - (OFString *)fileSymbolicLinkDestination { return attributeForKeyOrException(self, of_file_attribute_key_symbolic_link_destination); } @end |
Modified src/exceptions/OFSetItemAttributesFailedException.h from [70304f6b00] to [b9798161de].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFException.h" |
︙ |