list method
- String dirPath
override
Implementation
@override
Stream<Entity> list(String dirPath) async* {
final nPath = join(root.path, dirPath);
await for (final entity in io.Directory(nPath).list()) {
final rPath = relative(entity.path, from: root.path);
yield switch (entity.statSync().type) {
io.FileSystemEntityType.file => File(rPath),
io.FileSystemEntityType.directory => Dir(rPath),
_ => throw "[Native filesystem] unsupported format!",
};
}
}