ParseFromIO

final class ParseFromIO[P, +A](p: P)(con: P => Parsley[A])

This class exposes a method of running parsers from a file.

This class exposes a method of running parsers from a file.

Value Params
con

A conversion (if required) to turn p into a parser

p

The parser which serves as the method receiver

Version

3.0.0

class Object
trait Matchable
class Any

Value members

Concrete methods

def parseFromFile[Err](file: File)(`evidence$1`: ErrorBuilder[Err], codec: Codec): Try[Result[Err, A]]

This method executes a parser, but collects the input to the parser from the given file. The file name is used to annotate any error messages. The result of this method handles exceptions and ensures the file has been properly closed.

This method executes a parser, but collects the input to the parser from the given file. The file name is used to annotate any error messages. The result of this method handles exceptions and ensures the file has been properly closed.

Value Params
codec

The encoding of the file

file

The file to load and run against

Returns

a Try containing a result of either a success with a value of type A or a failure with error message on success, and a failure if an IOException occured

Since

3.0.0