allow recursive (-p) directory creation
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>
Thu, 4 Sep 2008 07:53:52 +0000 (07:53 +0000)
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>
Thu, 4 Sep 2008 07:53:52 +0000 (07:53 +0000)
lib/python/Tools/Directories.py

index 576d27731d7e5512f791b2edf7fa1492b2f4cc51..8a35f1da2440cf73d7dbc1c7bf38b7efd9ad8dba 100644 (file)
@@ -126,9 +126,12 @@ def resolveFilename(scope, base = "", path_prefix = None):
 def pathExists(path):
        return os_path.exists(path)
 
 def pathExists(path):
        return os_path.exists(path)
 
-def createDir(path):
+def createDir(path, makeParents = False):
        try:
        try:
-               mkdir(path)
+               if makeParents:
+                       makedirs(path)
+               else:
+                       mkdir(path)
        except:
                ret = 0
        else:
        except:
                ret = 0
        else: