summaryrefslogtreecommitdiffstats
path: root/src/server/fileutil.h
diff options
context:
space:
mode:
authorSimon Rettberg2013-08-28 17:54:19 +0200
committerSimon Rettberg2013-08-28 17:54:19 +0200
commitbfdac5b274d8ca371307d2b4b417092ba25f11ab (patch)
treec62b57b0d56995057f152f1e1273dc3383a709a1 /src/server/fileutil.h
parent[SERVER] On-the-fly transparent proxying (diff)
downloaddnbd3-bfdac5b274d8ca371307d2b4b417092ba25f11ab.tar.gz
dnbd3-bfdac5b274d8ca371307d2b4b417092ba25f11ab.tar.xz
dnbd3-bfdac5b274d8ca371307d2b4b417092ba25f11ab.zip
[SERVER] Copy CRC-32 list from uplink server if available
Split up helper.c, move file/disk related functions to fileutil.c Uplink: Make sure relayed requests are at least 1MiB
Diffstat (limited to 'src/server/fileutil.h')
-rw-r--r--src/server/fileutil.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/server/fileutil.h b/src/server/fileutil.h
new file mode 100644
index 0000000..394338b
--- /dev/null
+++ b/src/server/fileutil.h
@@ -0,0 +1,14 @@
+#ifndef _FILEUTIL_H_
+#define _FILEUTIL_H_
+
+#include "../types.h"
+#include <time.h>
+
+int file_isReadable(char *file);
+int file_isWritable(char *file);
+int mkdir_p(const char* path);
+int file_alloc(int fd, uint64_t offset, uint64_t size);
+uint64_t file_freeDiskSpace(const char * const path);
+time_t file_lastModification(const char * const file);
+
+#endif /* FILEUTIL_H_ */