FB2Parser constructor
FB2Parser(
- String path
Implementation
FB2Parser(this.path) {
// match the file extension
RegExpMatch? match = RegExp(r'\.fb2$').firstMatch(path);
if (match == null) {
throw Exception('The file extension is not .fb2');
}
file = File(path);
if (!file.existsSync()) {
throw Exception('The file does not exist');
}
}