]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/OsPath.h
2 Header file for helper functions useful to operate file directories by parsing
5 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _EFI_OS_PATH_H
17 #define _EFI_OS_PATH_H
19 #include <Common/UefiBaseTypes.h>
22 // Functions declarations
34 This function returns the directory path which contains the particular path.
42 This function does not check for the existence of the file.
44 The caller must free the string returned.
48 FilePath Path name of file to get the parent directory for.
58 OsPathNormPathInPlace (
66 This function returns the directory path which contains the particular path.
72 This function does not check for the existence of the file.
76 Path Path name of file to normalize
80 The string is altered in place.
95 This function replaces the final portion of a path with an alternative
96 'peer' filename. For example:
97 "a/b/../c", "peer" -> "a/b/../peer"
98 "a/b/", "peer" -> "a/b/peer"
99 "/a", "peer" -> "/peer"
100 "a", "peer" -> "peer"
102 This function does not check for the existence of the file.
106 OldPath Path name of replace the final segment
107 Peer The new path name to concatinate to become the peer path
111 A CHAR8* string, which must be freed by the caller
118 IN CHAR8
*InputFileName
125 Checks if a file exists
129 InputFileName The name of the file to check for existence
134 FALSE The file does not exist