filesSnapshot method

  1. @override
List<EasyLogBackendFile> filesSnapshot()
override

Implementation

@override
List<EasyLogBackendFile> filesSnapshot() {
  final directory = Directory(directoryPath);
  if (!directory.existsSync()) {
    return const <EasyLogBackendFile>[];
  }
  return directory
      .listSync()
      .whereType<File>()
      .where((file) => file.path.endsWith('.log'))
      .map(_fileInfo)
      .toList(growable: false);
}