Lines Matching defs:path

156 // Splits path to strings

158 void SplitPathToParts(const UString &path, UStringVector &pathParts)
161 unsigned len = path.Len();
167 if (IsPathSepar(path[i]))
169 name.SetFrom(path.Ptr(prev), i - prev);
173 name.SetFrom(path.Ptr(prev), len - prev);
177 void SplitPathToParts_2(const UString &path, UString &dirPrefix, UString &name)
179 const wchar_t *start = path;
180 const wchar_t *p = start + path.Len();
184 dirPrefix.SetFrom(path, (unsigned)(p - start));
188 void SplitPathToParts_Smart(const UString &path, UString &dirPrefix, UString &name)
190 const wchar_t *start = path;
191 const wchar_t *p = start + path.Len();
200 dirPrefix.SetFrom(path, (unsigned)(p - start));
205 UString ExtractDirPrefixFromPath(const UString &path)
207 return path.Left(path.ReverseFind_PathSepar() + 1));
211 UString ExtractFileNameFromPath(const UString &path)
213 return UString(path.Ptr((unsigned)(path.ReverseFind_PathSepar() + 1)));
222 bool DoesNameContainWildcard(const UString &path)
224 for (unsigned i = 0; i < path.Len(); i++)
226 wchar_t c = path[i];
379 void CCensorNode::AddItem(bool include, const UString &path, const CCensorPathProps &props)
382 SplitPathToParts(path, item.PathParts);
445 bool CCensorNode::CheckPath2(bool isAltStream, const UString &path, bool isFile, bool &include) const
448 SplitPathToParts(path, pathParts);
467 bool CCensorNode::CheckPath(bool isAltStream, const UString &path, bool isFile) const
470 if (CheckPath2(isAltStream, path, isFile, include))
499 bool CCensorNode::CheckPathToRoot(bool include, const UString &path, bool isFile) const
502 SplitPathToParts(path, pathParts);
562 if there was tail path separator (slash) in original full path string. */
606 void CCensor::AddItem(ECensorPathMode pathMode, bool include, const UString &path,
609 if (path.IsEmpty())
610 throw "Empty file path";
613 SplitPathToParts(path, pathParts);
622 // we have tail path separator. So it's directory.
623 // we delete tail path separator here even for "\" and "c:\"
659 // if absolute path, then all parts before last part will be in prefix
722 UString s ("file path was blocked for files and directories: ");
723 s += path;
739 bool CCensor::CheckPath(bool isAltStream, const UString &path, bool isFile) const
745 if (Pairs[i].Head.CheckPath2(isAltStream, path, isFile, include))
780 void CCensor::AddPreItem(bool include, const UString &path, const CCensorPathProps &props)
783 cp.Path = path;