annotate common/portpath.h @ 151:0df62decff90

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

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