Mercurial > trustbridge
comparison common/portpath.h @ 1157:fd7d04bb37cb
(issue36) Add encoding aware port_fopen function and use it
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 18 Sep 2014 15:43:22 +0200 |
parents | f110a3f6e387 |
children | 82fab0c689bf |
comparison
equal
deleted
inserted
replaced
1156:e986d3d4705f | 1157:fd7d04bb37cb |
---|---|
7 */ | 7 */ |
8 #ifndef PORTPATH_H | 8 #ifndef PORTPATH_H |
9 #define PORTPATH_H | 9 #define PORTPATH_H |
10 | 10 |
11 #include <stdbool.h> | 11 #include <stdbool.h> |
12 #include <stdio.h> | |
12 | 13 |
13 /** | 14 /** |
14 * @file portpath.h | 15 * @file portpath.h |
15 * @brief Platform independent functions for file and path handling. | 16 * @brief Platform independent functions for file and path handling. |
16 * @details portpath contains functions to handle file and path names | 17 * @details portpath contains functions to handle file and path names |
80 * @param[in] path the path to the directory | 81 * @param[in] path the path to the directory |
81 * @returns true if the directory was created | 82 * @returns true if the directory was created |
82 */ | 83 */ |
83 bool port_mkdir_p(const char *path, bool propagate_acl); | 84 bool port_mkdir_p(const char *path, bool propagate_acl); |
84 | 85 |
86 /** | |
87 * @brief Open a file in read binary mode | |
88 * | |
89 * @param[in] path UTF-8 (or local 8 bit encoding) | |
90 * encoded filename | |
91 * @param[in] exclusive weather or not to open the file with | |
92 * a denywr lock. Ignored under linux. | |
93 * @returns the same as fopen. | |
94 */ | |
95 FILE* port_fopen_rb(const char *path, bool exclusive); | |
96 | |
85 #endif | 97 #endif |