diff options
Diffstat (limited to 'lib/file-util.h')
-rw-r--r-- | lib/file-util.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/file-util.h b/lib/file-util.h new file mode 100644 index 0000000..d5f7e9c --- /dev/null +++ b/lib/file-util.h @@ -0,0 +1,26 @@ +/** + * SPDX-License-Identifier: Apache-2.0 + * + * @file file-util.h + * @brief file utility functions + */ +#ifndef REFOP_FILE_UTIL_H +#define REFOP_FILE_UTIL_H +//----------------------------------------------------------------------------- +#include <unistd.h> + +//----------------------------------------------------------------------------- +#ifdef __cplusplus +extern "C" { +#endif +//----------------------------------------------------------------------------- + +ssize_t safe_read(int fd, void *buf, size_t count); +ssize_t safe_write(int fd, void *buf, size_t count); + +//----------------------------------------------------------------------------- +#ifdef __cplusplus +} +#endif +//----------------------------------------------------------------------------- +#endif //#ifndef REFOP_FILE_UTIL_H |