Extensible Firmware Interface Specification
198 12/12/00 Version 1.02
10.2.5 EFI_FILE.Write()
Summary
Writes data to a file.
EFI_STATUS
(EFIAPI *EFI_FILE_WRITE) (
IN EFI_FILE *This,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
);
Parameters
This A pointer to the EFI_FILE instance that is the file handle to write data
to. Type EFI_FILE is defined in Section 10.2.
BufferSize On input, the size of the Buffer. On output, the amount of data
actually written. In both cases, the size is measured in bytes.
Buffer The buffer of data to write.
Description
The Write() function writes the specified number of bytes to the file at the current file position.
The current file position is advanced the actual number of bytes written, which is returned in
BufferSize. Partial writes only occur when there has been a data error during the write attempt
(such as file space full). The file is automatically grown to hold the data if required.
Direct writes to opened directories are not supported.
Status Codes Returned
EFI_SUCCESS The data was written.
EFI_UNSUPPORT Writes to open directory files are not supported.
EFI_NO_MEDIA The device has no medium.
EFI_DEVICE_ERROR The device reported an error.
EFI_VOLUME_CORRUPTED The file system structures are corrupted.
EFI_WRITE_PROTECTED The file or medium is write protected.
EFI_ACCESS_DENIED The file was opened read only.
EFI_VOLUME_FULL The volume is full.