clean method

Future<void> clean({
  1. bool nowWrite = true,
})

Implementation

Future<void> clean({
  bool nowWrite = true,
}) async {
  final List<AssetItem> items = list.values.toList();
  await Future.wait(
    items.map((AssetItem item) async {
      if (item.isUse) return;
      await remove(item.path, nowWrite: false);
    })
  );
  if (nowWrite) await writeListFile();
}