Lines Matching refs:file
65 for file in files + dirs:
66 path = os.path.join(walkroot, file)
177 for file in files:
178 yield os.path.join(root, file)
182 def __is_path_below(file, root): argument
183 return (file + os.path.sep).startswith(root)
209 def __realpath(file, root, loop_cnt, assume_dir): argument
210 while os.path.islink(file) and len(file) >= len(root):
212 raise OSError(errno.ELOOP, file)
215 target = os.path.normpath(os.readlink(file))
218 tdir = os.path.dirname(file)
223 file = __realpath_rel(tdir, target, root, loop_cnt, assume_dir)
226 is_dir = os.path.isdir(file)
230 return (file, is_dir)
232 def realpath(file, root, use_physdir = True, loop_cnt = 100, assume_dir = False): argument
241 file = os.path.normpath(file)
247 if not __is_path_below(file, root):
248 raise OSError(errno.EINVAL, "file '%s' is not below root" % file)
252 file = __realpath_rel(root, file[(len(root) - 1):], root, loop_cnt, assume_dir)
254 file = __realpath(file, root, loop_cnt, assume_dir)[0]
262 (file, e.strerror))
266 return file