aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils-file.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-01-26 19:05:28 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2017-01-26 19:05:28 +0100
commita85c80f25325c69579f3b6c6df847d631e68d0b5 (patch)
treeef55a8c8c75a0ff064fe42d77bbba0547ab9bf9f /src/utils-file.h
parenta08368b93b263aa52df3eeb4c90669ae6da7cd6e (diff)
Add utils-file and provide json-c
This is an intermediate commit providing new features for common utils. Change-Id: Ide92167d8e4e5013ddadd718c02071ea837938e3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/utils-file.h')
-rw-r--r--src/utils-file.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/utils-file.h b/src/utils-file.h
new file mode 100644
index 0000000..a29b09a
--- /dev/null
+++ b/src/utils-file.h
@@ -0,0 +1,24 @@
+/*
+ Copyright 2017 IoT.bzh
+
+ author: José Bollo <jose.bollo@iot.bzh>
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+extern int getfile_at(int dfd, const char *file, char **content, size_t *size);
+extern int getfile(const char *file, char **content, size_t *size);
+
+extern int putfile_at(int dfd, const char *file, const void *content, size_t size);
+extern int putfile(const char *file, const void *content, size_t size);
+