jooby/src/main/java/org/jooby/MediaType.java
public static Optional<MediaType> byPath(final Path path) {
    requireNonNull(path, "A path is required.");
    return byPath(path.toString());
  }
public static Optional<MediaType> byPath(final Path path) {
    requireNonNull(path, "A path is required.");
    return byPath(path.toString());
  }
Get a {@link MediaType} for a file path.

@param path A candidate file path.
@return A {@link MediaType} or empty optional for unknown file extensions.