readFilePath<T> static method

T readFilePath<T>({
  1. required String filePath,
  2. required FileParser<T> parser,
})

Attempts to read a File from the specified filePath, and parse it with the specified parser. Common FileParser implementations are available from FileParsers. If the file doesn't exist, throws a FileSystemException

Implementation

static T readFilePath<T>(
    {required String filePath, required FileParser<T> parser}) {
  final reqFile = File(filePath);
  return readFile(file: reqFile, parser: parser);
}