Mongo streams allows to remove files based on previsously llisted files, in very simillar way how the reading of the files work.
Instead of returning content of the file, it will return Unit
.
Files can be removed with either single file syntax or multiple file syntax:
list named ("old_file.txt") and removeFile
list files() foreach removeFile).flatMapProcess(_._2)
Total for specification FSDeleteSpec | |
---|---|
Finished in | 923 ms |
Results | 2 examples, 0 failure, 0 error |