MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / checkAndAddFile

Method checkAndAddFile

tools/aapt/FileFinder.cpp:80–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void 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

Callers

nothing calls this directly

Calls 3

toLowerMethod · 0.80
sizeMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected