| 78 | } |
| 79 | |
| 80 | void SystemFileFinder::checkAndAddFile(String8 path, const struct stat* stats, |
| 81 | Vector<String8>& extensions, |
| 82 | KeyedVector<String8,time_t>& fileStore) |
| 83 | { |
| 84 | // Loop over the extensions, checking for a match |
| 85 | bool done = false; |
| 86 | String8 ext(path.getPathExtension()); |
| 87 | ext.toLower(); |
| 88 | for (size_t i = 0; i < extensions.size() && !done; ++i) { |
| 89 | String8 ext2 = extensions[i].getPathExtension(); |
| 90 | ext2.toLower(); |
| 91 | // Compare the extensions. If a match is found, add to storage. |
| 92 | if (ext == ext2) { |
| 93 | done = true; |
| 94 | fileStore.add(path,stats->st_mtime); |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | |