* Callback for processing files found in data/ directory. * * @param name The name of the file. * @param path The relative path of the file. * @param size The file size (bytes). * @return True if the processing went OK. */
| 441 | * @return True if the processing went OK. |
| 442 | */ |
| 443 | static bool _File_Init_Callback(const char *name, const char *path, uint32 size) |
| 444 | { |
| 445 | char *ext; |
| 446 | FileInfo *fileInfo; |
| 447 | |
| 448 | fileInfo = _File_Init_AddFileInRootDir(name, size); |
| 449 | if (fileInfo == NULL) return false; |
| 450 | ext = strrchr(path, '.'); |
| 451 | if (ext != NULL) { |
| 452 | if (strcasecmp(ext, ".pak") == 0) { |
| 453 | if (!_File_Init_ProcessPak(path, size, fileInfo)) { |
| 454 | Warning("Failed to process PAK file %s\n", path); |
| 455 | return false; |
| 456 | } |
| 457 | } |
| 458 | } |
| 459 | return true; |
| 460 | } |
| 461 | |
| 462 | static bool File_MakeDirectory(char *dir) |
| 463 | { |
nothing calls this directly
no test coverage detected