@CanIgnoreReturnValue
  public PathSubject isDirectory() {
    exists(); // check for directoryness should imply check for existence

    if (!Files.isDirectory(actual, linkOptions)) {
      failWithActual(simpleFact("expected to be directory"));
    }
    return this;
  }
Asserts that the path is a directory.
jimfs/src/test/java/com/google/common/jimfs/PathSubject.java