Improve FileList no that Files are removed from memory
The following discussion from !3325 (merged) should be addressed:
-
@MSevey started a discussion: (+4 comments) I think that some kind of
renter.ForEachFile(dir, regex string, f func(sf *SiaFile) error) error
method would be nice. Maybe it could even apply some kind of regex before actually opening the file. That would allow us to stream files through the API one-by-one. It's still expensive if all files are requested, but at least we open the file -> send it -> close it instead of opening all of them, sending all of them and then closing all of them.
-
Needs to return an error
Edited by Matthew Sevey