targetFileConfigs method

  1. @override
List<String> targetFileConfigs()
override

returns all paths from source, mapped to the

Implementation

@override
List<String> targetFileConfigs() {
  final localPath = path;

  final dir = di<FileSystem>().directory(localPath);

  if (!dir.existsSync()) {
    return [];
  }

  final files = dir.listSync(recursive: true).whereType<File>();

  final brickFiles = <String>[];

  for (final file in files) {
    brickFiles.add(file.path.replaceFirst(RegExp('$localPath.'), ''));
  }

  return brickFiles;
}