OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
FileMisc.c File Reference
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/OcFileLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/DevicePath.h>
#include <Protocol/SimpleFileSystem.h>

Go to the source code of this file.

Functions

BOOLEAN OcFileExists (IN CONST EFI_FILE_PROTOCOL *Directory, IN CONST CHAR16 *FileName)
 
EFI_STATUS OcDeleteFile (IN EFI_FILE_PROTOCOL *Directory, IN CONST CHAR16 *FileName)
 

Detailed Description

Misc file utils.

Copyright (c) 2022, Mike Beaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause

Definition in file FileMisc.c.

Function Documentation

◆ OcDeleteFile()

EFI_STATUS OcDeleteFile ( IN EFI_FILE_PROTOCOL * Directory,
IN CONST CHAR16 * FileName )

Delete child file relative to source file's location.

Parameters
DirectoryFile protocol instance of parent directory.
FileNameNull-terminated file name or relative path.
Return values
EFI_SUCCESSFile successfully deleted.
EFI_NOT_FOUNDFile was not present.
otherOther error opening or deleting file.

Definition at line 49 of file FileMisc.c.

◆ OcFileExists()

BOOLEAN OcFileExists ( IN CONST EFI_FILE_PROTOCOL * Directory,
IN CONST CHAR16 * FileName )

Report existence of file relative to source file's location.

Parameters
DirectoryFile protocol instance of parent directory.
FileNameNull-terminated file name or relative path.
Return values
TRUEwhen file exists.

Definition at line 21 of file FileMisc.c.