TianoCore EDK2 master
|
#include "UefiShellLevel2CommandsLib.h"
#include <Guid/FileSystemInfo.h>
#include <Guid/FileSystemVolumeLabelInfo.h>
Go to the source code of this file.
Functions | |
SHELL_STATUS | ValidateAndCopyFiles (IN CONST EFI_SHELL_FILE_INFO *FileList, IN CONST CHAR16 *DestDir, IN BOOLEAN SilentMode, IN BOOLEAN RecursiveMode, IN VOID **Resp) |
SHELL_STATUS | CopySingleFile (IN CONST CHAR16 *Source, IN CONST CHAR16 *Dest, OUT VOID **Resp, IN BOOLEAN SilentMode, IN CONST CHAR16 *CmdName) |
SHELL_STATUS | ProcessValidateAndCopyFiles (IN EFI_SHELL_FILE_INFO *FileList, IN CONST CHAR16 *DestDir, IN BOOLEAN SilentMode, IN BOOLEAN RecursiveMode) |
SHELL_STATUS EFIAPI | ShellCommandRunCp (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
STATIC CONST SHELL_PARAM_ITEM | ParamList [] |
Main file for cp shell level 2 function.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Cp.c.
SHELL_STATUS CopySingleFile | ( | IN CONST CHAR16 * | Source, |
IN CONST CHAR16 * | Dest, | ||
OUT VOID ** | Resp, | ||
IN BOOLEAN | SilentMode, | ||
IN CONST CHAR16 * | CmdName | ||
) |
Function to Copy one file to another location
If the destination exists the user will be prompted and the result put into *resp
[in] | Source | pointer to source file name |
[in] | Dest | pointer to destination file name |
[out] | Resp | pointer to response from question. Pass back on looped calling |
[in] | SilentMode | whether to run in quiet mode or not |
[in] | CmdName | Source command name requesting single file copy |
SHELL_SUCCESS | The source file was copied to the destination |
SHELL_STATUS ProcessValidateAndCopyFiles | ( | IN EFI_SHELL_FILE_INFO * | FileList, |
IN CONST CHAR16 * | DestDir, | ||
IN BOOLEAN | SilentMode, | ||
IN BOOLEAN | RecursiveMode | ||
) |
Validate and if successful copy all the files from the list into destination directory.
[in] | FileList | The list of files to copy. |
[in] | DestDir | The directory to copy files to. |
[in] | SilentMode | TRUE to eliminate screen output. |
[in] | RecursiveMode | TRUE to copy directories. |
SHELL_INVALID_PARAMETER | A parameter was invalid. |
SHELL_SUCCESS | The operation was successful. |
SHELL_STATUS EFIAPI ShellCommandRunCp | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
SHELL_STATUS ValidateAndCopyFiles | ( | IN CONST EFI_SHELL_FILE_INFO * | FileList, |
IN CONST CHAR16 * | DestDir, | ||
IN BOOLEAN | SilentMode, | ||
IN BOOLEAN | RecursiveMode, | ||
IN VOID ** | Resp | ||
) |
Function to take a list of files to copy and a destination location and do the verification and copying of those files to that location. This function will report any errors to the user and halt.
[in] | FileList | A LIST_ENTRY* based list of files to move. |
[in] | DestDir | The destination location. |
[in] | SilentMode | TRUE to eliminate screen output. |
[in] | RecursiveMode | TRUE to copy directories. |
[in] | Resp | The response to the overwrite query (if always). |
SHELL_SUCCESS | the files were all moved. |
SHELL_INVALID_PARAMETER | a parameter was invalid |
SHELL_SECURITY_VIOLATION | a security violation ocurred |
SHELL_WRITE_PROTECTED | the destination was write protected |
SHELL_OUT_OF_RESOURCES | a memory allocation failed |
function to take a list of files to copy and a destination location and do the verification and copying of those files to that location. This function will report any errors to the user and halt.
The key is to have this function called ONLY once. this allows for the parameter verification to happen correctly.
[in] | FileList | A LIST_ENTRY* based list of files to move. |
[in] | DestDir | The destination location. |
[in] | SilentMode | TRUE to eliminate screen output. |
[in] | RecursiveMode | TRUE to copy directories. |
[in] | Resp | The response to the overwrite query (if always). |
SHELL_SUCCESS | the files were all moved. |
SHELL_INVALID_PARAMETER | a parameter was invalid |
SHELL_SECURITY_VIOLATION | a security violation ocurred |
SHELL_WRITE_PROTECTED | the destination was write protected |
SHELL_OUT_OF_RESOURCES | a memory allocation failed |