Overview
Comment: | Change -[contentsOfURLAtPath:] to return URLs
Returning strings is confusing for many as Foundation returns URLs here, |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
9135c5fcb85c1edb35893acf238672da |
User & Date: | js on 2021-04-04 18:46:33 |
Other Links: | manifest | tags |
Context
2021-04-05
| ||
21:31 | ofhttp: Fix finding ObjOpenSSL opportunistically check-in: e37212ea80 user: js tags: trunk | |
16:30 | Add support for UNIX socket addresses check-in: 1db6618bb9 user: js tags: unix-sockets | |
2021-04-04
| ||
18:46 | Change -[contentsOfURLAtPath:] to return URLs check-in: 9135c5fcb8 user: js tags: trunk | |
13:25 | Rename +[pluginFromFile:] to +[pluginWithPath:] check-in: 45f8195351 user: js tags: trunk | |
Changes
Modified src/OFFileManager.h from [baf85f358e] to [056f59171f].
︙ | |||
387 388 389 390 391 392 393 | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | - + + - + - + | * @param path The path to the directory whose items should be returned * @return An array of OFString with the items in the specified directory */ - (OFArray OF_GENERIC(OFString *) *)contentsOfDirectoryAtPath: (OFString *)path; #endif /** |
︙ |
Modified src/OFFileManager.m from [6804846ccf] to [89ccc3daf1].
︙ | |||
452 453 454 455 456 457 458 | 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 | - + - + + - + + + + + | [self createDirectoryAtURL: [OFURL fileURLWithPath: path] createParents: createParents]; objc_autoreleasePoolPop(pool); } #endif |
︙ | |||
593 594 595 596 597 598 599 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 | - + | destinationURL: destination errNo: e.errNo]; } type = attributes.fileType; if ([type isEqual: of_file_type_directory]) { |
︙ | |||
633 634 635 636 637 638 639 | 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | - + - + - - - + - - + - + | exceptionWithSourceURL: source destinationURL: destination errNo: [e errNo]]; @throw e; } |
︙ |
Modified src/OFFileURLHandler.m from [5499dbdb21] to [db7a703dd2].
︙ | |||
1008 1009 1010 1011 1012 1013 1014 | 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | - + - + | exceptionWithURL: URL errNo: errno]; #endif objc_autoreleasePoolPop(pool); } |
︙ | |||
1048 1049 1050 1051 1052 1053 1054 | 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 | - + + | if (wcscmp(fd.cFileName, L".") == 0 || wcscmp(fd.cFileName, L"..") == 0) continue; file = [[OFString alloc] initWithUTF16String: fd.cFileName]; @try { |
︙ | |||
1086 1087 1088 1089 1090 1091 1092 | 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 | - + + | strcmp(fd.cFileName, "..") == 0) continue; file = [[OFString alloc] initWithCString: fd.cFileName encoding: encoding]; @try { |
︙ | |||
1132 1133 1134 1135 1136 1137 1138 | 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 | - + + | @try { while ((ed = ExamineDir(context)) != NULL) { OFString *file = [[OFString alloc] initWithCString: ed->Name encoding: encoding]; @try { |
︙ | |||
1154 1155 1156 1157 1158 1159 1160 | 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 | - + + | errNo: retrieveError()]; while (ExNext(lock, &fib)) { OFString *file = [[OFString alloc] initWithCString: fib.fib_FileName encoding: encoding]; @try { |
︙ | |||
1223 1224 1225 1226 1227 1228 1229 | 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 | - + + - + - + | if (strcmp(dirent->d_name, ".") == 0 || strcmp(dirent->d_name, "..") == 0) continue; file = [[OFString alloc] initWithCString: dirent->d_name encoding: encoding]; @try { |
︙ | |||
1263 1264 1265 1266 1267 1268 1269 | 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 | - + - + - + - | path = URL.fileSystemRepresentation; if ((error = of_lstat(path, &s)) != 0) @throw [OFRemoveItemFailedException exceptionWithURL: URL errNo: error]; if (S_ISDIR(s.st_mode)) { |
︙ |
Modified src/OFURLHandler.h from [811c1948ca] to [9ec6927971].
︙ | |||
133 134 135 136 137 138 139 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | - + + - + - + | * @brief Creates a directory at the specified URL. * * @param URL The URL of the directory to create */ - (void)createDirectoryAtURL: (OFURL *)URL; /** |
︙ |
Modified src/OFURLHandler.m from [227a2dfab0] to [7996e25454].
︙ | |||
162 163 164 165 166 167 168 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - + | } - (void)createDirectoryAtURL: (OFURL *)URL { OF_UNRECOGNIZED_SELECTOR } |
︙ |