-
Notifications
You must be signed in to change notification settings - Fork 11
Description
The CreateParser.create()
methods in Parser.scala all take a string file path, which doesn't work for a resource file in the jar. Would be nice to have version(s) that took a URL, Source, or Stream.
Library version:
1.0.0
Expected behavior:
that I can call CreateParser[IO].create(resource)
with a resource from a jar.
Actual behavior:
Right now they all take a string representing a file path, which gives a FileNotFound exception if you pass in the path of a resource, since it's inside the jar.
Steps to reproduce:
- put
referers.json
into your project's resources - call
CreateParser[Id].create(getClass.getResource("/referers.json").getPath)
you get a FileNotFound exception. I can read the file successfully using normal Java file read operations if I use the URL or a stream from getResourceAsStream, but I can't read from the path itself, since it's not a normal file system path.