code: private static PathCriteria parsePath(File path) {
          int starIndex = path.toString().indexOf(STAR);
          int wildcardIndex = path.toString().indexOf(WILDCARD);
  
          int index = (starIndex < wildcardIndex || wildcardIndex < 0) ? starIndex : wildcardIndex;
  
          if(index == 0 && path.toString().length() == 1)
              return new PathCriteria(String.valueOf(SEPARATOR), "", path.toString());
          else {
              int parentSeparatorIndex = index-1;
              while(path.toString().charAt(parentSeparatorIndex) != SEPARATOR && parentSeparatorIndex > -1)
                  parentSeparatorIndex--;
  
              int childSeparatorIndex = index+1;
              if(childSeparatorIndex < path.toString().length())
                  while(path.toString().charAt(childSeparatorIndex) != SEPARATOR && parentSeparatorIndex < path.toString().length())
                      childSeparatorIndex++;
  
              String parentPath = path.toString().substring(0, parentSeparatorIndex);
              String criteria = path.toString().substring(parentSeparatorIndex+1, childSeparatorIndex);
              String childPath = path.toString().substring(childSeparatorIndex, path.toString().length());
  
              return new PathCriteria(parentPath, childPath, criteria);
          }
      }
docs: todo: path criteria need to check if separator is in the path