]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/OsPath.h
0386dfa50dbd846ec673e34985acbb12a8cae11c
3 Copyright (c) 2007 - 2008, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Header file for helper functions useful to operate file directories
23 #ifndef _EFI_OS_PATH_H
24 #define _EFI_OS_PATH_H
26 #include <Common/UefiBaseTypes.h>
29 // Functions declarations
41 This function returns the directory path which contains the particular path.
49 This function does not check for the existence of the file.
51 The caller must free the string returned.
55 FilePath Path name of file to get the parent directory for.
65 OsPathNormPathInPlace (
73 This function returns the directory path which contains the particular path.
79 This function does not check for the existence of the file.
83 Path Path name of file to normalize
87 The string is altered in place.
102 This function replaces the final portion of a path with an alternative
103 'peer' filename. For example:
104 "a/b/../c", "peer" -> "a/b/../peer"
105 "a/b/", "peer" -> "a/b/peer"
106 "/a", "peer" -> "/peer"
107 "a", "peer" -> "peer"
109 This function does not check for the existence of the file.
113 OldPath Path name of replace the final segment
114 Peer The new path name to concatinate to become the peer path
118 A CHAR8* string, which must be freed by the caller
125 IN CHAR8
*InputFileName
132 Checks if a file exists
136 InputFileName The name of the file to check for existence
141 FALSE The file does not exist