Open file from path
cxong opened this issue · comments
Cong commented
Would be nice to have a function that returns a tinydir_file
from a path.
int tinydir_file_open(tinydir_file *file, const char *path);
Cong commented
There doesn't seem to be functions that can read a single file without also scanning through the whole directory to open it. So as a naive first implementation, tinydir_file_open
can open the parent dir, scan through all the contents for a string match, and return the matching file.