summaryrefslogtreecommitdiffstats
path: root/src/server/fileutil.h
diff options
context:
space:
mode:
authorSimon Rettberg2017-10-01 17:24:43 +0200
committerSimon Rettberg2017-10-01 17:24:43 +0200
commitf86126bfc3fefac726dcb613be91012a656f7c6f (patch)
tree6abf4289db94f7953ce762ed57c7745fd571cc34 /src/server/fileutil.h
parent[*] constness for sock_sendAll params (diff)
downloaddnbd3-f86126bfc3fefac726dcb613be91012a656f7c6f.tar.gz
dnbd3-f86126bfc3fefac726dcb613be91012a656f7c6f.tar.xz
dnbd3-f86126bfc3fefac726dcb613be91012a656f7c6f.zip
[SERVER] Helper function for loading line based space separated data from file
Diffstat (limited to 'src/server/fileutil.h')
-rw-r--r--src/server/fileutil.h4
1 files changed, 3 insertions, 1 deletions
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 <stdint.h>
+#include <stdbool.h>
#include <time.h>
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_ */