From f86126bfc3fefac726dcb613be91012a656f7c6f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sun, 1 Oct 2017 17:24:43 +0200 Subject: [SERVER] Helper function for loading line based space separated data from file --- src/server/fileutil.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/server/fileutil.h') diff --git a/src/server/fileutil.h b/src/server/fileutil.h index d868ccc..36ee432 100644 --- a/src/server/fileutil.h +++ b/src/server/fileutil.h @@ -1,7 +1,8 @@ #ifndef _FILEUTIL_H_ #define _FILEUTIL_H_ -#include "../types.h" +#include +#include #include bool file_isReadable(char *file); @@ -10,5 +11,6 @@ bool mkdir_p(const char* path); bool file_alloc(int fd, uint64_t offset, uint64_t size); int64_t file_freeDiskSpace(const char * const path); time_t file_lastModification(const char * const file); +int file_loadLineBased(const char * const file, int minFields, int maxFields, void (*cb)(int argc, char **argv, void *data), void *data); #endif /* FILEUTIL_H_ */ -- cgit v1.2.3-55-g7522