MCPcopy Create free account
hub / github.com/F-Stack/f-stack / FIO_listFile

Function FIO_listFile

freebsd/contrib/zstd/programs/fileio.c:2993–3026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2991}
2992
2993static int
2994FIO_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
3028int FIO_listMultipleFiles(unsigned numFiles, const char** filenameTable, int displayLevel)
3029{

Callers 1

FIO_listMultipleFilesFunction · 0.85

Calls 4

memsetFunction · 0.85
getFileInfoFunction · 0.85
displayInfoFunction · 0.85
FIO_addFInfoFunction · 0.85

Tested by

no test coverage detected