Overview
Comment: | Add OFMutableLHAArchiveEntry |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
60ecab6058c9ab77bc1d8d00ac8ebfba |
User & Date: | js on 2018-06-10 15:29:10 |
Other Links: | manifest | tags |
Context
2018-06-10
| ||
15:33 | Make GCC happy again check-in: 273171692b user: js tags: trunk | |
15:29 | Add OFMutableLHAArchiveEntry check-in: 60ecab6058 user: js tags: trunk | |
14:42 | ofzip: Show compression method for ZIP archives check-in: fd5dac720d user: js tags: trunk | |
Changes
Modified src/Makefile from [66da2ef2a8] to [4d1d1ae8a6].
︙ | |||
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | + | OFMapTable.m \ OFMD5Hash.m \ OFMessagePackExtension.m \ OFMethodSignature.m \ OFMutableArray.m \ OFMutableData.m \ OFMutableDictionary.m \ OFMutableLHAArchiveEntry.m \ OFMutablePair.m \ OFMutableSet.m \ OFMutableString.m \ OFMutableTarArchiveEntry.m \ OFMutableTriple.m \ OFMutableURL.m \ OFMutableZIPArchiveEntry.m \ |
︙ |
Modified src/OFLHAArchiveEntry.h from [d2c4f03490] to [49f219a84b].
︙ | |||
25 26 27 28 29 30 31 | 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 | - + - - + - + | @class OFMutableArray OF_GENERIC(ObjectType); @class OFNumber; @class OFString; /*! * @class OFLHAArchiveEntry OFLHAArchiveEntry.h ObjFW/OFLHAArchiveEntry.h * |
︙ | |||
74 75 76 77 78 79 80 | 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 | - + - - - - - | * @brief The date of the file. */ @property (readonly, retain, nonatomic) OFDate *date; /*! * @brief The LHA level of the file. */ |
︙ | |||
128 129 130 131 132 133 134 135 136 137 138 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + | /*! * @brief The date of the last modification of the file. */ @property OF_NULLABLE_PROPERTY (readonly, retain, nonatomic) OFDate *modificationDate; /*! * @brief The LHA extensions of the file. */ @property (readonly, copy, nonatomic) OFArray OF_GENERIC(OFData *) *extensions; /*! * @brief Creates a new OFLHAArchiveEntry with the specified file name. * * @param fileName The file name for the OFLHAArchiveEntry * @return A new, autoreleased OFLHAArchiveEntry */ + (instancetype)entryWithFileName: (OFString *)fileName; - (instancetype)init OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFLHAArchiveEntry with the specified * file name. * * @param fileName The file name for the OFLHAArchiveEntry * @return An initialized OFLHAArchiveEntry */ - (instancetype)initWithFileName: (OFString *)fileName; @end OF_ASSUME_NONNULL_END #import "OFMutableLHAArchiveEntry.h" |
Modified src/OFLHAArchiveEntry.m from [af0de69839] to [2705c71e3d].
︙ | |||
250 251 252 253 254 255 256 | 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 | - + - + - - + + - - - - - + + + + + + + + + + + + + + + + + | @throw [OFInvalidFormatException exception]; extension = [stream readDataWithCount: size - 2]; if (!parseExtension(entry, extension, encoding, allowFileName)) [entry->_extensions addObject: extension]; |
︙ | |||
297 298 299 300 301 302 303 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + - + - + - + | memcpy(&_uncompressedSize, header + 11, 4); _uncompressedSize = OF_BSWAP32_IF_BE(_uncompressedSize); memcpy(&date, header + 15, 4); date = OF_BSWAP32_IF_BE(date); |
︙ | |||
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 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 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + | [super dealloc]; } - (id)copy { return [self retain]; } - (id)mutableCopy { OFLHAArchiveEntry *copy = [[OFMutableLHAArchiveEntry alloc] initWithFileName: _fileName]; @try { [copy->_compressionMethod release]; copy->_compressionMethod = nil; [copy->_date release]; copy->_date = nil; copy->_directoryName = [_directoryName copy]; copy->_compressionMethod = [_compressionMethod copy]; copy->_compressedSize = _compressedSize; copy->_uncompressedSize = _uncompressedSize; copy->_date = [_date copy]; copy->_headerLevel = _headerLevel; copy->_CRC16 = _CRC16; copy->_operatingSystemIdentifier = _operatingSystemIdentifier; copy->_fileComment = [_fileComment copy]; copy->_mode = [_mode retain]; copy->_UID = [_UID retain]; copy->_GID = [_GID retain]; copy->_owner = [_owner copy]; copy->_group = [_group copy]; copy->_modificationDate = [_modificationDate retain]; copy->_extensions = [_extensions copy]; } @catch (id e) { [copy release]; @throw e; } return copy; } - (OFString *)fileName { if (_directoryName == nil) return _fileName; return [_directoryName stringByAppendingString: _fileName]; } - (OFString *)compressionMethod { return _compressionMethod; } - (uint32_t)compressedSize { return _compressedSize; } - (uint32_t)uncompressedSize { return _uncompressedSize; } - (OFDate *)date { return _date; } - (uint8_t)headerLevel { return _headerLevel; } - (uint16_t)CRC16 { return _CRC16; } - (uint8_t)operatingSystemIdentifier { return _operatingSystemIdentifier; } - (OFString *)fileComment { return _fileComment; } - (OFNumber *)mode { return _mode; } - (OFNumber *)UID { return _UID; } - (OFNumber *)GID { return _GID; } - (OFString *)owner { return _owner; } - (OFString *)group { return _group; } - (OFDate *)modificationDate { return _modificationDate; } - (OFArray OF_GENERIC(OFData *) *)extensions { return _extensions; } - (OFString *)description { void *pool = objc_autoreleasePoolPush(); OFString *mode = (_mode == nil ? @"(nil)" : [OFString stringWithFormat: @"%" PRIo16, [_mode uInt16Value]]); OFString *extensions = [[_extensions description] stringByReplacingOccurrencesOfString: @"\n" withString: @"\n\t"]; OFString *ret = [OFString stringWithFormat: @"<%@:\n" @"\tFile name = %@\n" @"\tCompression method = %@\n" @"\tCompressed size = %" @PRIu32 "\n" @"\tUncompressed size = %" @PRIu32 "\n" @"\tDate = %@\n" |
Added src/OFMutableLHAArchiveEntry.h version [47e47e4256].