code: public static boolean directoryContains(final URI directory, final URI child) {
          final String d = directory.normalize().toString();
          final String c = child.normalize().toString();
          if (d.equals(c)) {
              return false;
          } else {
              return c.startsWith(d);
          }
      }
docs: Determines whether the parent directory contains the child element (a file or directory)
  
  @param directory the file to consider as the parent
  @param child the file to consider as the child
  @return true is the candidate leaf is under by the specified composite, otherwise false