summaryrefslogtreecommitdiff
path: root/src/openvpn/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvpn/platform.h')
-rw-r--r--src/openvpn/platform.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/openvpn/platform.h b/src/openvpn/platform.h
index 288937d..091fc9c 100644
--- a/src/openvpn/platform.h
+++ b/src/openvpn/platform.h
@@ -49,6 +49,7 @@
#endif
#include "basic.h"
+#include "buffer.h"
/* Get/Set UID of process */
@@ -143,4 +144,21 @@ typedef struct stat platform_stat_t;
#endif
int platform_stat(const char *path, platform_stat_t *buf);
+/**
+ * Create a temporary file in directory, returns the filename of the created
+ * file.
+ */
+const char *platform_create_temp_file(const char *directory, const char *prefix,
+ struct gc_arena *gc);
+
+/** Put a directory and filename together. */
+const char *platform_gen_path(const char *directory, const char *filename,
+ struct gc_arena *gc);
+
+/** Return true if pathname is absolute. */
+bool platform_absolute_pathname(const char *pathname);
+
+/** Return true if filename can be opened for read. */
+bool platform_test_file(const char *filename);
+
#endif /* ifndef PLATFORM_H */