-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathglib.h
More file actions
28 lines (21 loc) · 864 Bytes
/
glib.h
File metadata and controls
28 lines (21 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef GLIB_HEADER_FILLE_H
#define GLIB_HEADER_FILLE_H
char *timestamp(char *ts, size_t max);
char *timestamp_record(char *ts, size_t ts_max_sz);
char *timestamp_elapsed(char *ts0, char* elapsed, size_t max_sz);
int logWriteTS(const char *ts, const char *text, char* filename);
int fileRead(const char*filename, char*memptr, unsigned int ufsz);
// log
extern char defaultfilename[];
int logInit(const char *filename, bool create=false);
int logWrite(const char *text, char* filename=defaultfilename);
// file
int file_copy(const char *filename, const char *filename_copy);
int file_size(const char *);
int file_getcontent(const char *, char *, size_t );
int file_rotate(char *filename);
int file_mode_change(const char *filename, const char *user, const char *mode);
int file_delete(const char *filename);
bool isNumber(char *);
#endif
/* END OF FILE */