-
Notifications
You must be signed in to change notification settings - Fork 98
Description
I want to read content from a file in the root folder and write content from there to files in the same volume at different levels of the folder hierartchy (so under the same root directory).
For that if I get it right, I need to open the root folder, open the file, then change directory and open file for write and write.
However, once the file is open (and I don't close it since I'm processing it), I can't change_dir (can't borrow the dir as mutable because it's borrowed for the open file).
So how can this be done?
Should I open a second instance of the root folder and change from there?
What if I close the root folder of the second instance? will it close also the first? Or are these just two instances of the same folder that work separately? But then what happens if in one I add files? Will the other reflect that?