Esempio n. 1
0
static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
                            const UString &name, bool include, NRecursedType::EEnum type)
{
    /*
    if (!IsWildcardFilePathLegal(name))
      return false;
    */
    bool isWildcard = DoesNameContainWildcard(name);
    bool recursed = false;

    switch (type)
    {
    case NRecursedType::kWildcardOnlyRecursed:
        recursed = isWildcard;
        break;
    case NRecursedType::kRecursed:
        recursed = true;
        break;
    case NRecursedType::kNonRecursed:
        recursed = false;
        break;
    }
    wildcardCensor.AddPreItem(include, name, recursed, true);
    return true;
}
Esempio n. 2
0
static void AddNameToCensor(NWildcard::CCensor &censor,
    const UString &name, bool include, NRecursedType::EEnum type, bool wildcardMatching)
{
  bool recursed = false;

  switch (type)
  {
    case NRecursedType::kWildcardOnlyRecursed:
      recursed = DoesNameContainWildcard(name);
      break;
    case NRecursedType::kRecursed:
      recursed = true;
      break;
  }
  censor.AddPreItem(include, name, recursed, wildcardMatching);
}