@CanIgnoreReturnValue
  public PathSubject hasNoChildren() throws IOException {
    isDirectory();

    try (DirectoryStream<Path> stream = Files.newDirectoryStream(actual)) {
      if (stream.iterator().hasNext()) {
        failWithActual(simpleFact("expected to have no children"));
      }
    }
    return this;
  }
Asserts that the directory has no children.
jimfs/src/test/java/com/google/common/jimfs/PathSubject.java