Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void scanFolder(const char *dirName) {
- if (DIR *pDIR = opendir(dirName)) {
- while (auto entry = readdir(pDIR)) {
- char *fileName = entry->d_name;
- if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) {
- if (isFolder(fileName)) {
- //found another folder scan deeper
- scanFolder(fileVector, fileName);
- } else {
- //found a file
- std::string str = dirName;
- str.append("/").append(fileName);
- }
- }
- }
- closedir(pDIR);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement