]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Include/Library/PathLib.h
Refine comments and two code style.
[mirror_edk2.git] / ShellPkg / Include / Library / PathLib.h
CommitLineData
ab94587a 1/** @file\r
2 Provides interface to path manipulation functions.\r
3\r
4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php.\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12**/\r
13\r
14#ifndef _PATH_LIB_\r
15#define _PATH_LIB_\r
16\r
17#include <Base.h>\r
18#include <Library/BaseMemoryLib.h>\r
19\r
20/**\r
21 Removes the last directory or file entry in a path by changing the last\r
22 L'\' to a CHAR_NULL.\r
23\r
4ff7e37b 24 @param[in, out] Path The pointer to the path to modify.\r
ab94587a 25\r
26 @retval FALSE Nothing was found to remove.\r
27 @retval TRUE A directory or file was removed.\r
28**/\r
29BOOLEAN\r
30EFIAPI\r
31PathRemoveLastItem(\r
32 IN OUT CHAR16 *Path\r
33 );\r
34\r
35/**\r
36 Function to clean up paths. \r
37 \r
38 - Single periods in the path are removed.\r
39 - Double periods in the path are removed along with a single parent directory.\r
40 - Forward slashes L'/' are converted to backward slashes L'\'.\r
41\r
42 This will be done inline and the existing buffer may be larger than required \r
43 upon completion.\r
44\r
45 @param[in] Path The pointer to the string containing the path.\r
46\r
47 @retval NULL An error occured.\r
48 @return Path in all other instances.\r
49**/\r
50CHAR16*\r
51EFIAPI\r
52PathCleanUpDirectories(\r
53 IN CHAR16 *Path\r
54 );\r
55\r
56#endif //_PATH_LIB_\r