TianoCore EDK2 master
Loading...
Searching...
No Matches
Rm.c File Reference

Go to the source code of this file.

Functions

BOOLEAN IsDirectoryEmpty (IN SHELL_FILE_HANDLE FileHandle)
 
SHELL_STATUS CascadeDelete (IN EFI_SHELL_FILE_INFO *Node, IN CONST BOOLEAN Quiet)
 
BOOLEAN IsValidDeleteTarget (IN CONST EFI_SHELL_FILE_INFO *List, IN CONST EFI_SHELL_FILE_INFO *Node, IN CONST LIST_ENTRY *Package)
 
SHELL_STATUS EFIAPI ShellCommandRunRm (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC CONST SHELL_PARAM_ITEM ParamList []
 

Detailed Description

Main file for attrib shell level 2 function.

(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Rm.c.

Function Documentation

◆ CascadeDelete()

SHELL_STATUS CascadeDelete ( IN EFI_SHELL_FILE_INFO Node,
IN CONST BOOLEAN  Quiet 
)

Delete a node and all nodes under it (including sub directories).

Parameters
[in]NodeThe node to start deleting with.
[in]QuietTRUE to print no messages.
Return values
SHELL_SUCCESSThe operation was successful.
SHELL_ACCESS_DENIEDA file was read only.
SHELL_ABORTEDThe abort message was received.
SHELL_DEVICE_ERRORA device error occurred reading this Node.

Definition at line 66 of file Rm.c.

◆ IsDirectoryEmpty()

BOOLEAN IsDirectoryEmpty ( IN SHELL_FILE_HANDLE  FileHandle)

Determine if a directory has no files in it.

Parameters
[in]FileHandleThe EFI_HANDLE to the directory.
Return values
TRUEThe directory has no files (or directories).
FALSEThe directory has at least 1 file or directory in it.

Definition at line 26 of file Rm.c.

◆ IsValidDeleteTarget()

BOOLEAN IsValidDeleteTarget ( IN CONST EFI_SHELL_FILE_INFO List,
IN CONST EFI_SHELL_FILE_INFO Node,
IN CONST LIST_ENTRY Package 
)

Determines if a Node is a valid delete target. Will prevent deleting the root directory.

Parameters
[in]ListRESERVED. Not used.
[in]NodeThe node to analyze.
[in]PackageRESERVED. Not used.

Definition at line 206 of file Rm.c.

◆ ShellCommandRunRm()

SHELL_STATUS EFIAPI ShellCommandRunRm ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'rm' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 279 of file Rm.c.

Variable Documentation

◆ ParamList

Initial value:
= {
{ L"-q", TypeFlag },
{ NULL, TypeMax }
}
#define NULL
Definition: Base.h:319
@ TypeFlag
A flag that is present or not present only (IE "-a").
Definition: ShellLib.h:699

Definition at line 12 of file Rm.c.