2022-06-05 02:41:11 +02:00
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
// Example file Structure:
|
|
|
|
// jisho_data_22.01.01_1
|
|
|
|
// - history.json
|
2022-06-05 22:07:30 +02:00
|
|
|
// - library/
|
2022-06-05 02:41:11 +02:00
|
|
|
// - lista.json
|
|
|
|
// - listb.json
|
|
|
|
|
|
|
|
extension ArchiveFormat on Directory {
|
|
|
|
// TODO: make the export dir dependent on date
|
|
|
|
Directory get exportDirectory {
|
|
|
|
final dir = Directory(uri.resolve('export').path);
|
|
|
|
dir.createSync(recursive: true);
|
|
|
|
return dir;
|
|
|
|
}
|
|
|
|
|
|
|
|
File get historyFile => File(uri.resolve('history.json').path);
|
2022-06-05 22:07:30 +02:00
|
|
|
Directory get libraryDir => Directory(uri.resolve('library').path);
|
2022-06-05 02:41:11 +02:00
|
|
|
}
|