Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- util.io: added TemporaryDirectory class
The TemporaryDirectory class is inspired by lnussel's mytmpdir class in osc's (osc1) build.py module. An instance of this class represents a temporary directory in the filesystem. The temporary directory is created lazily. Once an instance of this class is destroyed, the corresponding temporary directory is removed as well (unless delete=False was passed to the __init__ method). Moreover, an instance of this class can be used as a context manager (__exit__ deletes the temporary directory, unless delete=False was passed to the __init__ method).
- Loading branch information
Showing
1 changed file
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters