File System Protocol
Version 1.02 12/12/00 191
Description
The EFI_FILE provides file IO access to supported file systems.
An EFI_FILE provides access to a files or directorys 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 files location, yielding new file handles.
On requesting the file system protocol on a device, the caller gets the
EFI_FILE_IO_INTERFACE to the volume. This interface is used to open the root directory of
the file system when needed. The caller must Close() 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 DISK_IO / BLOCK_IO 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.