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

Public Member Functions

def __init__ (self)
 
def __enter__ (self)
 
def __exit__ (self, t, v, tb)
 
def name (self)
 

Detailed Description

Helper class used for creating a temporary directory and working in it.

Definition at line 41 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

def utils.tmp_dir.__init__ (   self)

Reimplemented in git_utils.NewGitCheckout.

Definition at line 43 of file utils.py.

43 def __init__(self):
44 self._orig_dir = None
45 self._tmp_dir = None
46

Member Function Documentation

◆ __enter__()

def utils.tmp_dir.__enter__ (   self)

Reimplemented in git_utils.NewGitCheckout.

Definition at line 47 of file utils.py.

47 def __enter__(self):
48 self._orig_dir = os.getcwd()
49 self._tmp_dir = tempfile.mkdtemp()
50 os.chdir(self._tmp_dir)
51 return self
52

◆ __exit__()

def utils.tmp_dir.__exit__ (   self,
  t,
  v,
  tb 
)

Definition at line 53 of file utils.py.

53 def __exit__(self, t, v, tb):
54 os.chdir(self._orig_dir)
55 RemoveDirectory(self._tmp_dir)
56
#define RemoveDirectory

◆ name()

def utils.tmp_dir.name (   self)

Reimplemented in git_utils.NewGitCheckout.

Definition at line 58 of file utils.py.

58 def name(self):
59 return self._tmp_dir
60
61
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

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