Lines Matching refs:head
49 (head, tail) = os.path.split(name)
52 while head and tail and not os.path.isdir(head):
53 (head, tail) = os.path.split(head)
56 # now 'head' contains the deepest directory that already exists
57 # (that is, the child of 'head' in 'name' is the highest directory
60 #print "head = %s, d = %s: " % (head, d),
61 head = os.path.join(head, d)
62 abs_head = os.path.abspath(head)
68 log.info("creating %s", head)
72 os.mkdir(head, mode)
74 if not (exc.errno == errno.EEXIST and os.path.isdir(head)):
76 "could not create '%s': %s" % (head, exc.args[-1]))
77 created_dirs.append(head)