Lines Matching refs:path
99 def chown(path, owner, group):
137 # quickly find the trash directory for a path without having to create an
142 def get_trashdir(path):
144 Use path to determine the trash directory. This method does not create
145 the directory. If path is not contained within an image, return None.
156 if path.startswith(iroot):
160 img = image.Image(os.path.dirname(path),
163 # path is not within an image, no trash dir
165 trashdir = os.path.join(img.imgdir, trashname)
174 def move_to_trash(path):
180 trashdir = get_trashdir(path)
183 if not os.path.exists(trashdir):
188 os.rename(path, os.path.join(tdir, os.path.basename(path)))
206 def remove(path):
208 Remove the given path. The file is moved to the trash area of the
212 os.unlink(path)
216 move_to_trash(path)
221 def split_path(path):
222 drivepath = os.path.splitdrive(path)
225 def get_root(path):
226 drivepath = os.path.splitdrive(path)
228 return os.path.sep
232 def assert_mode(path, mode):
234 fmode = stat.S_IMODE(os.lstat(path).st_mode)
237 "want {2:o}".format(path, fmode, mode))