getAllLines function

List<String> getAllLines(
  1. String path
)

Implementation

List<String> getAllLines(String path) {
  var allLines = <String>[];

  var directory = Directory(path);

  directory.listSync(recursive: false).forEach((f) {
    print(f.path);
    if (f is File) {
      allLines += f.readAsLinesSync();
    } else if (f is Directory) {
      if (!f.path.endsWith('\\$DJS_DIRECTORY_NAME')) {
        print('Goging down in ${f.path}');
        allLines += getAllLines(f.absolute.path);
      }
    }
  });

  return allLines;
}