aboutsummaryrefslogtreecommitdiffstats
path: root/Library/UefiShellUfmCommandLib/cmds.h
blob: 863519237a7dc40271879e2a83bca11127a27c38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef UFM_CMDS_H
#define UFM_CMDS_H

#include <Uefi.h>
#include <Library/ShellLib.h>

/*
 * Deletes a node including subdirectories
 *
 * node: the node to start deleting with
 *
 * return: EFI_SUCCESS           The operation was successful
           EFI_ACCESS_DENIED     A file was read only
           EFI_ABORTED           The abort was received
           EFI_DEVICE_ERROR      A device error occurred reading this node
*/
EFI_STATUS delete_file(EFI_SHELL_FILE_INFO *node);

/*
 * Copies one file/directory (including subdirectories) to another location.
 * If destination is a directory, the source is copied to a directory
 *
 * NOTE: if destination is a existing file, the source overwrites file
 *
 * src: the pointer to source string
 * dest: the pointer to destination string
 *
 * return: unknown
*/
EFI_STATUS copy_file(CONST CHAR16 *src, CONST CHAR16 *dest);

/*
 * Creates one or more directories.
 *
 * dir_name: the name of a directory or directories to create
 *
 * return: EFI_SUCCESS           Directory(-ies) was created
           EFI_INVALID_PARAMETER Parameter has an invalid value
           EFI_ACCESS_DENIED     Error while creating directory(-ies)
           EFI_OUT_OF_RESOURCES  Not enough resources were available to open the
                                 file
*/
EFI_STATUS make_directory(CONST CHAR16 *dir_name);

#endif /* UFM_CMDS_H */