Home | Info | Community | Development | myReactOS | Contact Us
[private]
Definition at line 421 of file main.cxx.
Referenced by Run().
{ CAB_SEARCH Search; char Str[20]; ULONG FileCount = 0; ULONG ByteCount = 0; if (Open() == CAB_STATUS_SUCCESS) { printf("Cabinet %s\n\n", GetCabinetName()); if (FindFirst(&Search) == CAB_STATUS_SUCCESS) { do { if (Search.File->FileControlID != CAB_FILE_CONTINUED) { printf("%s ", Date2Str(Str, Search.File->FileDate)); printf("%s ", Time2Str(Str, Search.File->FileTime)); printf("%s ", Attr2Str(Str, Search.File->Attributes)); sprintf(Str, "%u", (UINT)Search.File->FileSize); printf("%s ", Pad(Str, ' ', 13)); printf("%s\n", Search.FileName); FileCount++; ByteCount += Search.File->FileSize; } } while (FindNext(&Search) == CAB_STATUS_SUCCESS); } DestroySearchCriteria(); if (FileCount > 0) { if (FileCount == 1) printf(" 1 file "); else { sprintf(Str, "%u", (UINT)FileCount); printf(" %s files ", Pad(Str, ' ', 12)); } if (ByteCount == 1) printf(" 1 byte\n"); else { sprintf(Str, "%u", (UINT)ByteCount); printf("%s bytes\n", Pad(Str, ' ', 12)); } } else { /* There should be at least one file in a cabinet */ printf("No files in cabinet."); } return true; } else printf("Cannot open file: %s\n", GetCabinetName()); return false; }