You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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::copy the subdirectory - which forces a recursive copy
tmp::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::directory to 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:
It would be nice to have a solution for converting a subdirectory of the
tmp::directory
into a newtmp::directory
that is not going to be deleted when its parent is destroyed.Currently, the options are:
tmp::directory::copy
the 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.tmp::directory
to 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");
The text was updated successfully, but these errors were encountered: