comparison common/portpath.h @ 146:306e4db11761

Added portable path name handling functions. Windows implementation missing.
author Sascha Wilde <wilde@intevation.de>
date Mon, 24 Mar 2014 17:23:06 +0100
parents
children 92d7e0b40808
comparison
equal deleted inserted replaced
145:27ebd96798c4 146:306e4db11761
1 #ifndef PORTPATH_H
2 #define PORTPATH_H
3
4 /**
5 * @file portpath.h
6 * @brief Platform independent functions for file and path handling.
7 * @details portpath contains functions to handle file and path names
8 * in a platform independent way. The code unsing this functions
9 * should be protable between GNU/Linux and Windows32 systems.
10 */
11
12 /**
13 * @brief portable version of dirname
14 * @details return the directory component of the given path.
15 * The argument path may be altered by the function.
16 * @param[inout] path the pathname
17 * @returns a pointer to the string containing the directory component
18 */
19 char *port_dirname(char *path);
20
21
22 /**
23 * @brief portable version of dirname
24 * @details return the directory component of the given path.
25 * The argument path may be altered by the function.
26 * @param[inout] path the pathname
27 * @returns a pointer to the string containing the directory component
28 */
29 char *port_dirname(char *path);
30
31 /**
32 * @brief portable version of realpath
33 * @details return the expanded absolute pathname for the given path.
34 * The buffer for the resolved path is allocated by this function and
35 * should be freed by the caller.
36 * @param[in] path the original pathname
37 * @returns a pointer to the resolved path or NULL on error
38 */
39 char *port_realpath(char *path);
40
41 #endif

http://wald.intevation.org/projects/trustbridge/