Chromium Code Reviews| Index: tools/android/loading/common_util.py |
| diff --git a/tools/android/loading/common_util.py b/tools/android/loading/common_util.py |
| index 855284fdcf5761b43190047ac6ae5440cb1614f8..ed5c997e55662a9f304ad240f64ce41e446ad2cc 100644 |
| --- a/tools/android/loading/common_util.py |
| +++ b/tools/android/loading/common_util.py |
| @@ -89,3 +89,10 @@ def TemporaryDirectory(): |
| yield name |
| finally: |
| shutil.rmtree(name) |
| + |
| + |
| +def VerifyOrCreateParentDirectory(path): |
|
pasko
2016/04/14 12:34:42
nit: usually when I saw things like that they were
gabadie
2016/04/14 15:43:32
Done.
|
| + """Verifies that the parent directory exists or create it if missing.""" |
|
pasko
2016/04/14 12:34:42
s/create/creates/
gabadie
2016/04/14 15:43:32
Done.
|
| + parent_directory_path = os.path.abspath(os.path.dirname(path)) |
| + if not os.path.isdir(parent_directory_path): |
| + os.makedirs(parent_directory_path) |