files method

List<String> files()

Implementation

List<String> files() {
  var dir = Directory(location);
  var list = <String>[];
  if (dir.existsSync()) {
    for (var value in dir.listSync()) {
      FileSystemEntityType type = FileSystemEntity.typeSync(value.path);
      if (type == FileSystemEntityType.file) {
        list.add(value.path);
      }
    }
  }
  return list;
}