private static JimfsPath checkPath(Path path) {
    if (path instanceof JimfsPath) {
      return (JimfsPath) path;
    }
    throw new ProviderMismatchException(
        "path " + path + " is not associated with a Jimfs file system");
  }
A stream filter that always returns true.
jimfs/src/main/java/com/google/common/jimfs/JimfsSecureDirectoryStream.java