OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Guid/FileInfo.h>
#include <Protocol/SimpleFileSystem.h>
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/OcDevicePathLib.h>
#include <Library/OcFileLib.h>
Go to the source code of this file.
Functions | |
VOID * | OcReadFile (IN CONST EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem, IN CONST CHAR16 *FilePath, OUT UINT32 *FileSize OPTIONAL, IN CONST UINT32 MaxFileSize OPTIONAL) |
EFI_STATUS | OcReadFileSize (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem, IN CONST CHAR16 *FilePath, OUT UINT32 *Size) |
VOID * | OcReadFileFromDirectory (IN CONST EFI_FILE_PROTOCOL *RootDirectory, IN CONST CHAR16 *FilePath, OUT UINT32 *FileSize OPTIONAL, IN UINT32 MaxFileSize OPTIONAL) |
Copyright (C) 2019, vit9696. All rights reserved.
All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file ReadFile.c.
VOID * OcReadFile | ( | IN CONST EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * | FileSystem, |
IN CONST CHAR16 * | FilePath, | ||
OUT UINT32 *FileSize | OPTIONAL, | ||
IN CONST UINT32 MaxFileSize | OPTIONAL ) |
Read file from file system with implicit double (2 byte) null termination. Null termination does not affect the returned file size. Depending on the implementation 0 byte files may return null.
[in] | FileSystem | A pointer to the file system protocol of the volume. |
[in] | FilePath | The full path to the file on the device. |
[out] | FileSize | The size of the file read (optional). |
[in] | MaxFileSize | Upper file size bound (optional). |
A | pointer to a buffer containing file read or NULL. |
Definition at line 33 of file ReadFile.c.
VOID * OcReadFileFromDirectory | ( | IN CONST EFI_FILE_PROTOCOL * | RootDirectory, |
IN CONST CHAR16 * | FilePath, | ||
OUT UINT32 *FileSize | OPTIONAL, | ||
IN UINT32 MaxFileSize | OPTIONAL ) |
Read file from file protocol with implicit double (2 byte) null termination. Null termination does not affect the returned file size. Depending on the implementation 0 byte files may return null.
[in] | RootDirectory | A pointer to the file protocol of the directory. |
[in] | FilePath | The full path to the file on the device. |
[out] | FileSize | The size of the file read (optional). |
[in] | MaxFileSize | Upper file size bound (optional). |
A | pointer to a buffer containing file read or NULL. |
Definition at line 155 of file ReadFile.c.
EFI_STATUS OcReadFileSize | ( | IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * | FileSystem, |
IN CONST CHAR16 * | FilePath, | ||
OUT UINT32 * | Size ) |
Determine file size if it is less than 4 GB.
[in] | FileSystem | A pointer to the file system protocol of the volume. |
[in] | FilePath | The full path to the file on the device. |
[out] | Size | 32-bit file size. |
EFI_SUCCESS | on success. |
Definition at line 110 of file ReadFile.c.