Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
utils.TempDir Class Reference
Inheritance diagram for utils.TempDir:

Public Member Functions

def __init__ (self, prefix='')
 
def __enter__ (self)
 
def __exit__ (self, *_)
 

Detailed Description

Definition at line 529 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

def utils.TempDir.__init__ (   self,
  prefix = '' 
)

Definition at line 531 of file utils.py.

531 def __init__(self, prefix=''):
532 self._temp_dir = None
533 self._prefix = prefix
534

Member Function Documentation

◆ __enter__()

def utils.TempDir.__enter__ (   self)

Definition at line 535 of file utils.py.

535 def __enter__(self):
536 self._temp_dir = tempfile.mkdtemp(self._prefix)
537 return self._temp_dir
538

◆ __exit__()

def utils.TempDir.__exit__ (   self,
_ 
)

Definition at line 539 of file utils.py.

539 def __exit__(self, *_):
540 shutil.rmtree(self._temp_dir, ignore_errors=True)
541
542

The documentation for this class was generated from the following file: