comparison th_file.h @ 475:77d1af382e08

Improve th_stat_path() by changing flags into a struct and adding more information.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Jul 2018 07:28:13 +0300
parents 7fca448847a3
children b1e80180818a
comparison
equal deleted inserted replaced
474:b3b8f90bbbe6 475:77d1af382e08
33 TH_IS_WRITABLE = 0x0002, 33 TH_IS_WRITABLE = 0x0002,
34 TH_IS_READABLE = 0x0004, 34 TH_IS_READABLE = 0x0004,
35 }; 35 };
36 36
37 37
38 typedef struct
39 {
40 int flags;
41 off_t size;
42 uint64_t atime, mtime;
43 } th_stat_data;
44
45
38 char * th_get_home_dir(); 46 char * th_get_home_dir();
39 char * th_get_config_dir(const char *name); 47 char * th_get_config_dir(const char *name);
40 48
41 BOOL th_stat_path(const char *path, int *flags); 49 BOOL th_stat_path(const char *path, th_stat_data *data);
42 BOOL th_mkdir_path(const char *cpath, int mode); 50 BOOL th_mkdir_path(const char *cpath, int mode);
43 51
44 52
45 #ifdef __cplusplus 53 #ifdef __cplusplus
46 } 54 }