listAssets method

Iterable<String> listAssets({
  1. bool relative = false,
})

All asset file paths in book root directory.

Implementation

Iterable<String> listAssets({bool relative = false}) {
  final assets = [
    if (isMultilingual)
      ..._filterFilesIn(
        root,
        (String f) => !_isIgnoreFile(f) && !ignore.isIgnored(f),
      ),
    for (final book in books.values)
      ..._filterFilesIn(
        book.bookPath,
        (String f) => !_isIgnoreFile(f) && book.isAsset(f),
      ),
  ];
  return relative ? assets.map((e) => p.relative(e, from: root)) : assets;
}