class FileResourceLoader implements ResourceLoader {

  @Override
  public Optional<InputStream> load(final String source) throws IOException {
    final Path path = Path.of(source);
    if (!path.toFile().exists()) {
      return Optional.empty();
    }
    return Optional.of(Files.newInputStream(path));
  }

}