Intel Extensible Firmware Interface User Manual
Page 381

Protocols
— Bootable Image Support
Version 1.10
12/01/02
11-21
SetPosition
Sets the current file position. See the
function
description.
GetInfo
Gets the requested file or volume information. See the
function description.
SetInfo
Sets the requested file information. See the
function
description.
Flush
Flushes all modified data associated with the file to the device. See the
function description.
Description
The
EFI_FILE
provides file IO access to supported file systems.
An
EFI_FILE
provides access to a file’s or directory’s contents, and is also a reference to a
location in the directory tree of the file system in which the file resides. With any given file handle,
other files may be opened relative to this file’s location, yielding new file handles.
On requesting the file system protocol on a device, the caller gets the
to the volume. This interface is used to open the root directory of
the file system when needed. The caller must
the file handle to the root directory, and
any other opened file handles before exiting. While there are open files on the device, usage of
underlying device protocol(s) that the file system is abstracting must be avoided. For example,
when a file system that is layered on a
protocol, direct block access to the
device for the blocks that comprise the file system must be avoided while there are open file
handles to the same device.
A file system driver may cache data relating to an open file. A
Flush()
function is provided that
flushes all dirty data in the file system, relative to the requested file, to the physical medium. If the
underlying device may cache data, the file system must inform the device to flush as well.