Lines Matching refs:pathParts
158 void SplitPathToParts(const UString &path, UStringVector &pathParts)
160 pathParts.Clear();
170 pathParts.Add(name);
174 pathParts.Add(name);
261 bool CItem::CheckPath(const UStringVector &pathParts, bool isFile) const
272 if (pathParts.Size() <= 1)
278 int delta = (int)pathParts.Size() - (int)PathParts.Size();
311 if (!DoesWildcardMatchName(PathParts[i], pathParts[i + (unsigned)d]))
316 if (CompareFileNames(PathParts[i], pathParts[i + (unsigned)d]) != 0)
412 bool CCensorNode::CheckPathCurrent(bool include, const UStringVector &pathParts, bool isFile) const
416 if (items[i].CheckPath(pathParts, isFile))
421 bool CCensorNode::CheckPathVect(const UStringVector &pathParts, bool isFile, bool &include) const
423 if (CheckPathCurrent(false, pathParts, isFile))
428 if (pathParts.Size() > 1)
430 int index = FindSubNode(pathParts.Front());
433 UStringVector pathParts2 = pathParts;
439 bool finded = CheckPathCurrent(true, pathParts, isFile);
447 UStringVector pathParts;
448 SplitPathToParts(path, pathParts);
449 if (CheckPathVect(pathParts, isFile, include))
454 if (isAltStream && !pathParts.IsEmpty())
456 UString &back = pathParts.Back();
461 return CheckPathVect(pathParts, isFile, include);
476 bool CCensorNode::CheckPathToRoot_Change(bool include, UStringVector &pathParts, bool isFile) const
478 if (CheckPathCurrent(include, pathParts, isFile))
482 pathParts.Insert(0, Name);
483 return Parent->CheckPathToRoot_Change(include, pathParts, isFile);
486 bool CCensorNode::CheckPathToRoot(bool include, const UStringVector &pathParts, bool isFile) const
488 if (CheckPathCurrent(include, pathParts, isFile))
494 pathParts2 += pathParts;
501 UStringVector pathParts;
502 SplitPathToParts(path, pathParts);
503 return CheckPathToRoot(include, pathParts, isFile);
535 unsigned GetNumPrefixParts_if_DrivePath(UStringVector &pathParts)
537 if (pathParts.IsEmpty())
541 if (pathParts[0].IsEmpty())
543 if (pathParts.Size() < 4
544 || !pathParts[1].IsEmpty()
545 || pathParts[2] != L"?")
549 if (NWildcard::IsDriveColonName(pathParts[testIndex]))
556 static unsigned GetNumPrefixParts(const UStringVector &pathParts)
558 if (pathParts.IsEmpty())
561 /* empty last part could be removed already from (pathParts),
566 if (IsDriveColonName(pathParts[0]))
568 if (!pathParts[0].IsEmpty())
571 if (pathParts.Size() == 1)
573 if (!pathParts[1].IsEmpty())
575 if (pathParts.Size() == 2)
577 if (pathParts[2] == L".")
581 if (pathParts[2] == L"?")
583 if (pathParts.Size() == 3)
585 if (IsDriveColonName(pathParts[3]))
587 if (!pathParts[3].IsEqualTo_Ascii_NoCase("UNC"))
595 if (pathParts.Size() <= networkParts)
596 return pathParts.Size();
601 return pathParts[0].IsEmpty() ? 1 : 0;
612 UStringVector pathParts;
613 SplitPathToParts(path, pathParts);
619 const UString &back = pathParts.Back();
625 pathParts.DeleteBack();
642 if (pathParts.Size() >= 3
643 && pathParts[0].IsEmpty()
644 && pathParts[1].IsEmpty()
645 && pathParts[2] == L"?")
654 const unsigned numPrefixParts = GetNumPrefixParts(pathParts);
660 if (numPrefixParts != 0 && pathParts.Size() > numPrefixParts)
661 numSkipParts = pathParts.Size() - 1;
665 for (unsigned i = numPrefixParts; i < pathParts.Size(); i++)
667 const UString &part = pathParts[i];
674 if (dotsIndex == (int)pathParts.Size() - 1)
675 numSkipParts = pathParts.Size();
677 numSkipParts = pathParts.Size() - 1;
681 // we split (pathParts) to (prefix) and (pathParts).
685 const UString &front = pathParts.Front();
693 pathParts.Delete(0);
706 if (pathParts.IsEmpty() || (pathParts.Size() == 1 && pathParts[0].IsEmpty()))
709 pathParts.Clear();
710 pathParts.Add(UString("*"));
730 item.PathParts = pathParts;