I am making an SDCARD scanner that scans every folder and image file.
I use C code and using the opendir, readdir, fopen API to list the directory and file. I have dirent, dir variables.
The problem is that fopen () takes too much time (300 seconds for 10,000 files), while moving the director takes ~ 25 seconds.
Is there any API that allows me to speed up working with an open file using handle, dir_ino or the like so that I can open the file with a directory descriptor or the like.
So far I watched n tried to use dirent-> dir_ino, DIR *, but no luck.
I was looking for a low level api that takes less time than fopen.
change will be fts and ftw apis useful? do they seem to be associated only with the move directory ... by any other hack or method?
source
share