I want to stream the lines contained in files but MOVING each file to another folder once it has been processed.
The current process is like this:
Explanation:>
I would just create two methods:
public void processFile(File f); public void moveFile(File f, File dstFolder);
then in lambda:
Stream.generate(localFileProvider::getNextFile).forEach(file-> { processFile(file); moveFile(file, dstFolder) } }