-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
It would be nice to have a solution for converting a subdirectory of the tmp::directory into a new tmp::directory that is not going to be deleted when its parent is destroyed.
Currently, the options are:
tmp::directory::copythe subdirectory - which forces a recursive copytmp::directory dir; fs::rename(tmpdir / "subdirectory", dir);- which is somewhat verbose and additionally requires handling of the cross-filesystem moves.- Wrapping the subdirectory with the original
tmp::directoryto prevent its deletion - which has 0 overhead and does not seem to have hidden problems, but is extremely verbose.
I think the method analogous to tmp::directory::copy which moves the filesystem tree into the new temporary directory would be a good solution for this:
tmp::directory subdirectory = tmp::directory::moveFrom(tmpdir / "subdirectory");Metadata
Metadata
Assignees
Labels
No labels