This commit enables the option to clone the TempDir object, allowing multiple structures to own their own instance.
It is common for a directory to be passed among multiple structures.
For example, during integration testing, there may be a scenario where two instances of a daemon are running simultaneously and accessing the disk. In such cases, the order of dropping the directory becomes irrelevant since it will be cleaned up at the end of the test anyway.
This commit enables the option to clone the TempDir object, allowing multiple structures to own their own instance.
It is common for a directory to be passed among multiple structures.
For example, during integration testing, there may be a scenario where two instances of a daemon are running simultaneously and accessing the disk. In such cases, the order of dropping the directory becomes irrelevant since it will be cleaned up at the end of the test anyway.