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

Method contains

src/common/config/dir_list.cpp:97–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97bool ParsedPath::contains(const ParsedPath& pPath) const
98{
99 FB_SIZE_T nFullElem = getCount();
100 if (nFullElem > 1 && (*this)[nFullElem - 1].length() == 0)
101 nFullElem--;
102
103 if (pPath.getCount() < nFullElem) {
104 return false;
105 }
106
107 for (FB_SIZE_T i = 0; i < nFullElem; i++)
108 {
109 if (pPath[i] != (*this)[i]) {
110 return false;
111 }
112 }
113
114 for (FB_SIZE_T i = nFullElem + 1; i <= pPath.getCount(); i++)
115 {
116 const PathName x = pPath.subPath(i);
117 if (PathUtils::isSymLink(x)) {
118 return false;
119 }
120 }
121 return true;
122}
123
124bool DirectoryList::keyword(const ListMode keyMode, PathName& value, PathName key, PathName next)
125{

Callers 2

stringBooleanMethod · 0.45
isPathInListMethod · 0.45

Calls 3

subPathMethod · 0.80
lengthMethod · 0.45
getCountMethod · 0.45

Tested by

no test coverage detected