def open(patch, name, mode="r", buffering=0):
    """
	Open a file, returning an object of the file type described in section
	File Objects.
	If the file cannot be opened, IOError is raised.
	When opening a file, its preferable to use open() instead of invoking
	the file constructor directly.
	"""
    path = os.path.abspath(os.path.join(os.getcwd(), name))
    manager = get_manager()
    fsi, relpath, readonly = manager.get_fsi(path)
    if fsi is None:
        return _org_open(relpath, mode, buffering)
    elif (("w" in mode) or ("a" in mode) or ("+" in mode)) and readonly:
        raise IOError("[Errno 1] Operation not permitted: '{p}'".format(p=path))
    else:
        try:
            return fsi.open(relpath, mode, buffering)
        except OperationFailure:
            raise os.error("[Errno 2] No such file or directory: '{p}'".format(p=path))

	Open a file, returning an object of the file type described in section
	File Objects.
	If the file cannot be opened, IOError is raised.
	When opening a file, its preferable to use open() instead of invoking
	the file constructor directly.
	
lib/mlpatches/mount_base.py