3 [![Build Status](https://travis-ci.org/cxong/tinydir.svg?branch=master)](https://travis-ci.org/cxong/tinydir)[![Project Stats](https://www.openhub.net/p/tinydir/widgets/project_thin_badge.gif)](https://www.openhub.net/p/tinydir)
5 Lightweight, portable and easy to integrate C directory and file reader. TinyDir wraps dirent for POSIX and FindFirstFile for Windows.
7 Windows unicode is supported by defining `UNICODE` and `_UNICODE` before including `tinydir.h`.
12 There are two methods. Error checking omitted:
16 tinydir_open(&dir, "/path/to/dir");
21 tinydir_readfile(&dir, &file);
23 printf("%s", file.name);
39 tinydir_open_sorted(&dir, "/path/to/dir");
41 for (i = 0; i < dir.n_files; i++)
44 tinydir_readfile_n(&dir, &file, i);
46 printf("%s", file.name);
57 See the `/samples` folder for more examples, including an interactive command-line directory navigator.
67 POSIX and Windows supported. Open to the possibility of supporting other platforms.
72 Simplified BSD; if you use tinydir you can comply by including `tinydir.h` or `COPYING` somewhere in your package.
77 - Limited path and filename sizes
78 - [Possible race condition bug if folder being read has changing content](https://github.com/cxong/tinydir/issues/13)