Lines Matching refs:path
40 def find_dir_of(path): argument
43 if len(path) > 1 and path[-1] == '/':
44 path = path[:-1]
47 d = os.path.dirname(path)
59 path = from_path
60 if path == None:
61 path = find_dir_of(sys.argv[0])
62 D("this script seems to be located in: %s" % path)
65 if path == "":
66 path = "."
68 file = path + "/" + target_file
71 if os.path.isfile(file):
72 D("found %s in %s" % (target_file, path))
75 if path == ".":
78 path = os.path.dirname(path)
80 path = ""
82 path = "../" + path
83 file = path + target_file
86 if os.path.isfile(file):
87 D("found %s in %s" % (target_file, path))
104 return os.path.dirname(file)
115 path = os.path.normpath(bionic_root + "/../../external/kernel-headers/original")
116 if not os.path.isdir(path):
117 D("Could not find %s" % (path))
120 return path
140 path = "/usr/src/linux-headers-" + version + "/include"
141 D("probing %s for kernel headers" % (path))
142 ret = os.path.isdir( path )
144 D("found kernel headers in: %s" % (path))
145 return path
152 path = "%s/arch/%s/include/asm/%s" % (kernel_headers, arch, header)
153 D("Probing for %s" % path)
154 if os.path.exists(path):
155 return path
159 path = "%s/include/asm-%s/%s" % (kernel_headers, arch, header)
160 D("Probing for %s" % path)
161 if os.path.exists(path):
162 return path
166 path = "%s/asm-%s/%s" % (kernel_headers, arch, header)
167 D("Probing for %s" % path)
168 if os.path.exists(path):
169 return path
317 def create_file_path(path): argument
320 parent = os.path.dirname(path)
324 path = parent
329 if os.path.isdir(dir):
335 for path in paths:
336 if not os.path.isdir(path):
337 callback(path,args)
339 for root, dirs, files in os.walk(path):
346 r, ext = os.path.splitext(f)
350 def cleanup_dir(path): argument
353 if not os.path.exists(path):
354 os.mkdir(path)
356 for root, dirs, files in os.walk(path, topdown=False):
361 os.remove(os.path.join(root, name))
363 os.rmdir(os.path.join(root, name))