Mercurial > trustbridge
diff 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 |
line wrap: on
line diff
--- a/common/portpath.h Thu Sep 18 12:56:31 2014 +0200 +++ b/common/portpath.h Thu Sep 18 15:43:22 2014 +0200 @@ -9,6 +9,7 @@ #define PORTPATH_H #include <stdbool.h> +#include <stdio.h> /** * @file portpath.h @@ -82,4 +83,15 @@ */ bool port_mkdir_p(const char *path, bool propagate_acl); +/** + * @brief Open a file in read binary mode + * + * @param[in] path UTF-8 (or local 8 bit encoding) + * encoded filename + * @param[in] exclusive weather or not to open the file with + * a denywr lock. Ignored under linux. + * @returns the same as fopen. + */ +FILE* port_fopen_rb(const char *path, bool exclusive); + #endif