def create_dir(self): """ Creates the directory hierarchy leading to the database file IFF it does not exist already """ try: dir=os.path.dirname(self.path) safe_mkdir(dir) except: return ("error", "cannot create directory hierarchy") return None
def build_layout(top, ns, pkg): """ Builds the directory layout """ for path in dir_list: ppath = subvars(path, ns=ns, pkg=pkg) existed, path=safe_mkdir([top, ppath]) if not existed: msg("Created path: [%s]" % ppath)
def makeEggReleaseDir(version, root): """ Make an `egg` release directory in the `root` directory The directory path will be according to the following :: $root/$version/eggs """ path = [root, version, 'eggs'] existed, path = safe_mkdir(path) return existed, path