File System Protocol
Version 1.02 12/12/00 193
Related Definitions
//*******************************************************
// Open Modes
//*******************************************************
#define EFI_FILE_MODE_READ 0x0000000000000001
#define EFI_FILE_MODE_WRITE 0x0000000000000002
#define EFI_FILE_MODE_CREATE 0x8000000000000000
//*******************************************************
// File Attributes
//*******************************************************
#define EFI_FILE_READ_ONLY 0x0000000000000001
#define EFI_FILE_HIDDEN 0x0000000000000002
#define EFI_FILE_SYSTEM 0x0000000000000004
#define EFI_FILE_RESERVED 0x0000000000000008
#define EFI_FILE_DIRECTORY 0x0000000000000010
#define EFI_FILE_ARCHIVE 0x0000000000000020
#define EFI_FILE_VALID_ATTR 0x0000000000000037
Description
The Open()function opens the file or directory referred to by FileName relative to the location
of This and returns a NewHandle. The FileName may include the following path modifiers:
\If the filename starts with a \ the relative location is the root directory
that This residues on; otherwise \ separates name components. Each
name component is opened in turn, and the handle to the last file opened
is returned.
.Opens the current location.
..Opens the parent directory for the current location. If the location is the
root directory the request will return an error, as there is no parent
directory for the root directory.
If EFI_FILE_MODE_CREATE is set, then the file is created in the directory. If the final location
of FileName does not refer to a directory or if the file already exists, the operation fails.
If the medium of the device changes, all accesses (including the File handle) will result in
EFI_MEDIA_CHANGED. To access the new medium, the volume must be re-opened.