Lines Matching full:path
17 """Get the full path to the directory containing the current script."""
18 script_filename = os.path.abspath(sys.argv[0])
19 return os.path.dirname(script_filename)
22 """Finds an ancestor dir in a path.
25 'c:\foo\bar'. Unlike FindUpward*, this only looks at direct path ancestors.
27 start_dir = os.path.abspath(start_dir)
28 path = start_dir
30 (parent, tail) = os.path.split(path)
32 return path
35 path = parent
42 or file, which may be given in one or more path components. Returns the
43 first directory in which the top desired path component was found, or raises
46 desired_path = os.path.join(*desired_list)
49 found_path = os.path.join(cur_dir, desired_path)
50 while not os.path.exists(found_path):
52 cur_dir = os.path.dirname(cur_dir)
56 found_path = os.path.join(cur_dir, desired_path)
57 # Strip the entire original desired path from the end of the one found
58 # and remove a trailing path separator, if present.
66 """Returns a path to the desired directory or file, searching upward.
69 or file, which may be given in one or more path components. Returns the full
70 path to the desired object, or raises PathNotFound if it wasn't found.
73 return os.path.join(parent, *desired_list)
76 def MaybeMakeDirectory(*path):
77 """Creates an entire path, if it doesn't already exist."""
78 file_path = os.path.join(*path)