Mercurial > trustbridge
comparison common/portpath.h @ 168:f100861dad8f
Added simple portable function to test if an file exists.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Tue, 25 Mar 2014 13:08:59 +0100 |
parents | 92d7e0b40808 |
children | 70d627e9e801 |
comparison
equal
deleted
inserted
replaced
167:92d7e0b40808 | 168:f100861dad8f |
---|---|
1 #ifndef PORTPATH_H | 1 #ifndef PORTPATH_H |
2 #define PORTPATH_H | 2 #define PORTPATH_H |
3 | |
4 #include <stdbool.h> | |
3 | 5 |
4 /** | 6 /** |
5 * @file portpath.h | 7 * @file portpath.h |
6 * @brief Platform independent functions for file and path handling. | 8 * @brief Platform independent functions for file and path handling. |
7 * @details portpath contains functions to handle file and path names | 9 * @details portpath contains functions to handle file and path names |
26 * @param[in] path the original pathname | 28 * @param[in] path the original pathname |
27 * @returns a pointer to the resolved path or NULL on error | 29 * @returns a pointer to the resolved path or NULL on error |
28 */ | 30 */ |
29 char *port_realpath(char *path); | 31 char *port_realpath(char *path); |
30 | 32 |
33 /** | |
34 * @brief test if a file exists | |
35 * @details uses a platform specific stat call to test if the given | |
36 * file exists. | |
37 * @param[in] path the path to the file | |
38 * @returns true if the file exists and false otherwise | |
39 */ | |
40 bool port_fileexits(char *path); | |
41 | |
31 #endif | 42 #endif |