def stat(patch, path):
    """
	Perform the equivalent of a stat() system call on the given path.
	(This function follows symlinks; to stat a symlink use lstat().)
	"""
    ap = os.path.abspath(os.path.join(CWD, path))
    manager = get_manager()
    fsi, relpath, readonly = manager.get_fsi(ap)
    if fsi is None:
        return _org_stat(relpath)
    else:
        try:
            return fsi.stat(relpath)
        except OperationFailure:
            raise os.error("[Errno 2] No such file or directory: '{p}'".format(p=ap))

	Perform the equivalent of a stat() system call on the given path.
	(This function follows symlinks; to stat a symlink use lstat().)
	
lib/mlpatches/mount_base.py