MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / isPathInList

Method isPathInList

src/common/config/dir_list.cpp:208–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208bool DirectoryList::isPathInList(const PathName& path) const
209{
210 if (fb_utils::bootBuild())
211 {
212 return true;
213 }
214
215 fb_assert(mode != NotInitialized);
216
217 // Handle special cases
218 switch (mode)
219 {
220 case None:
221 return false;
222 case Full:
223 return true;
224 }
225
226 PathName varpath(path);
227 if (PathUtils::isRelative(path)) {
228 PathUtils::concatPath(varpath, PathName(Config::getRootDirectory()), path);
229 }
230
231 ParsedPath pPath(varpath);
232 bool rc = false;
233 for (FB_SIZE_T i = 0; i < getCount(); i++)
234 {
235 if ((*this)[i].contains(pPath))
236 {
237 rc = true;
238 break;
239 }
240 }
241 return rc;
242}
243
244bool DirectoryList::expandFileName(PathName& path, const PathName& name) const
245{

Callers 3

ext_fopenFunction · 0.80
lookupModuleMethod · 0.80

Calls 2

bootBuildFunction · 0.85
containsMethod · 0.45

Tested by

no test coverage detected