mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 21:34:09 +00:00
![Klemens Friedl](/assets/img/avatar_default.png)
* sumatrapdf - vendor import * everything compiles (libjpeg, poppler, fitz, sumatrapdf) * does NOT link (remove the comment tags in the parent directory.rbuild file (rosapps dir) to build it) svn path=/trunk/; revision=29295
31 lines
900 B
C++
31 lines
900 B
C++
/* Written by Krzysztof Kowalczyk (http://blog.kowalczyk.info)
|
|
The author disclaims copyright to this source code. */
|
|
#include "base_util.h"
|
|
#include "file_util.h"
|
|
|
|
#define DIR_TO_READ "."
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
FileList* fileList = FileList_Get(DIR_TO_READ, NULL);
|
|
if (!fileList) {
|
|
printf("Couldn't read dir %s\n", DIR_TO_READ);
|
|
goto Exit;
|
|
}
|
|
|
|
FileInfo* fileInfo = fileList->first;
|
|
while (fileInfo) {
|
|
if (FileInfo_IsDir(fileInfo)) {
|
|
printf("d: %s, %s, %d\n", fileInfo->name, fileInfo->path, (int)fileInfo->size);
|
|
} else if (FileInfo_IsFile(fileInfo)) {
|
|
printf("f: %s, %s, %d\n", fileInfo->name, fileInfo->path, (int)fileInfo->size);
|
|
} else {
|
|
printf("Unknown type: %s\n", fileInfo->name);
|
|
}
|
|
fileInfo = fileInfo->next;
|
|
}
|
|
Exit:
|
|
FileList_Delete(fileList);
|
|
return 0;
|
|
}
|