| 2991 | } |
| 2992 | |
| 2993 | static int |
| 2994 | FIO_listFile(fileInfo_t* total, const char* inFileName, int displayLevel) |
| 2995 | { |
| 2996 | fileInfo_t info; |
| 2997 | memset(&info, 0, sizeof(info)); |
| 2998 | { InfoError const error = getFileInfo(&info, inFileName); |
| 2999 | switch (error) { |
| 3000 | case info_frame_error: |
| 3001 | /* display error, but provide output */ |
| 3002 | DISPLAYLEVEL(1, "Error while parsing \"%s\" \n", inFileName); |
| 3003 | break; |
| 3004 | case info_not_zstd: |
| 3005 | DISPLAYOUT("File \"%s\" not compressed by zstd \n", inFileName); |
| 3006 | if (displayLevel > 2) DISPLAYOUT("\n"); |
| 3007 | return 1; |
| 3008 | case info_file_error: |
| 3009 | /* error occurred while opening the file */ |
| 3010 | if (displayLevel > 2) DISPLAYOUT("\n"); |
| 3011 | return 1; |
| 3012 | case info_truncated_input: |
| 3013 | DISPLAYOUT("File \"%s\" is truncated \n", inFileName); |
| 3014 | if (displayLevel > 2) DISPLAYOUT("\n"); |
| 3015 | return 1; |
| 3016 | case info_success: |
| 3017 | default: |
| 3018 | break; |
| 3019 | } |
| 3020 | |
| 3021 | displayInfo(inFileName, &info, displayLevel); |
| 3022 | *total = FIO_addFInfo(*total, info); |
| 3023 | assert(error == info_success || error == info_frame_error); |
| 3024 | return (int)error; |
| 3025 | } |
| 3026 | } |
| 3027 | |
| 3028 | int FIO_listMultipleFiles(unsigned numFiles, const char** filenameTable, int displayLevel) |
| 3029 | { |
no test coverage detected