docs: private ArtifactNotification collectNotificationsForPrefix(String prefix, Collection<String> paths) {
          Set<String> gatheredPaths = new HashSet<String>();
          boolean notRecurse = prefix.startsWith("!");
          if (notRecurse) {
              prefix = prefix.substring(1);
          }
  
          if ("/".equals(prefix)) {
              gatheredPaths.addAll(paths);
          } else {
              for (String path : paths) {
                  if (path.startsWith(prefix + "/") || path.equals(prefix)) {
                      if (notRecurse) {
                          //needs a bit more care.. user asked for prefix, and immediate children..
                          //strip the prefix from the front.. this should always work.. as path has to be at least one char, as does prefix.
                          String fragment = path.substring(prefix.length());
                          //if resulting fragment has no path seps, notify on it.
                          // <1 lets / exist as first char or not at all
                          if (fragment.indexOf("/") < 1) {
                              gatheredPaths.add(path);
                          }
                      } else {
                          gatheredPaths.add(path);
                      }
                  }
              }
          }
          return new DefaultArtifactNotification(root, gatheredPaths);
      }