Source
27
27
zbx_fs_time_t modification_time; /* time of last modification */
28
28
zbx_fs_time_t access_time; /* time of last access */
29
29
zbx_fs_time_t change_time; /* time of last status change */
30
30
}
31
31
zbx_file_time_t;
32
32
33
33
int zbx_get_file_time(const char *path, int sym, zbx_file_time_t *time);
34
34
void zbx_find_cr_lf_szbyte(const char *encoding, const char **cr, const char **lf, size_t *szbyte);
35
35
36
36
#define ZBX_READ_ERR -1
37
-
#define ZBX_READ_NO_NEWLINE_ERR -2
37
+
#define ZBX_READ_WRONG_ENCODING -2
38
38
int zbx_read_text_line_from_file(int fd, char *buf, size_t count, const char *encoding);
39
39
int zbx_is_regular_file(const char *path);
40
40
char *zbx_fgets(char *buffer, int size, FILE *fp);
41
41
int zbx_write_all(int fd, const char *buf, size_t n);
42
42
43
43
#if defined(_WINDOWS) || defined(__MINGW32__)
44
44
# define zbx_open(pathname, flags) __zbx_open(pathname, flags | O_BINARY)
45
45
# define ZBX_PATH_SEPARATOR '\\'
46
46
int __zbx_open(const char *pathname, int flags);
47
47
#else