Differences From Artifact [49153fced5]:
- File
src/OFFileManager.m
— part of check-in
[2bdf205dfd]
at
2021-05-13 15:31:20
on branch trunk
— Move OFFileManager constants to a separate file
This allows including them from the Amiga linklib in the future. (user: js, size: 22437) [annotate] [blame] [check-ins using] [more...]
To Artifact [452b87ebf4]:
- File src/OFFileManager.m — part of check-in [6985da09c8] at 2021-07-03 13:56:32 on branch trunk — Add -[OFFileManager subpathsOfDirectoryAtPath:] (user: js, size: 23188) [annotate] [blame] [check-ins using]
︙ | |||
444 445 446 447 448 449 450 451 452 453 454 455 456 457 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | URLs = [self contentsOfDirectoryAtURL: [OFURL fileURLWithPath: path]]; ret = [OFMutableArray arrayWithCapacity: URLs.count]; for (OFURL *URL in URLs) [ret addObject: URL.lastPathComponent]; [ret makeImmutable]; [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } - (OFArray OF_GENERIC(OFString *) *)subpathsOfDirectoryAtPath: (OFString *)path { void *pool = objc_autoreleasePoolPush(); OFMutableArray OF_GENERIC(OFString *) *ret = [OFMutableArray arrayWithObject: path]; for (OFString *subpath in [self contentsOfDirectoryAtPath: path]) { void *pool2 = objc_autoreleasePoolPush(); OFString *fullSubpath = [path stringByAppendingPathComponent: subpath]; if ([self directoryExistsAtPath: fullSubpath]) [ret addObjectsFromArray: [self subpathsOfDirectoryAtPath: fullSubpath]]; else [ret addObject: fullSubpath]; objc_autoreleasePoolPop(pool2); } [ret makeImmutable]; [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } |
︙ |