This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Traverse a folder recursively, save all regular files to a slice and print | |
the final slice. | |
The slice structure is heavily inspired from Go. The main differences are: 1) its | |
memory needs to be freed, 2) the len() and cap() functions retun a size_t, not | |
an int. | |
The walk is optimized by using the `d_type` field from the `dirent` structure. | |
It works on *BSD and Linux but might not work on other systems. | |
*/ |