Efi_file.open(), Open() – Intel Extensible Firmware Interface User Manual
Page 382

Extensible Firmware Interface Specification
11-22
12/01/02
Version 1.10
EFI_FILE.Open()
Summary
Opens a new file relative to the source file’s location.
Prototype
EFI_STATUS
(EFIAPI *EFI_FILE_OPEN) (
IN
EFI_FILE
*This,
OUT
EFI_FILE
**NewHandle,
IN
CHAR16
*FileName,
IN
UINT64
OpenMode,
IN
UINT64
Attributes
);
Parameters
This
A pointer to the
instance that is the file handle to the source
location. This would typically be an open handle to a directory. See the
type
EFI_FILE
protocol description.
NewHandle
A pointer to the location to return the opened handle for the new file.
See the type
EFI_FILE
protocol description.
FileName
The Null-terminated string of the name of the file to be opened. The file
name may contain the following path modifiers: “\”,
“
.
”, and “
..
”.
OpenMode
The mode to open the file. The only valid combinations that the file may
be opened with are: Read, Read/Write, or Create/Read/Write. See
“Related Definitions” below.
Attributes
Only valid for
EFI_FILE_MODE_CREATE
,
in which case these are the
attribute bits for the newly created file. See “Related Definitions” below.
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