diff options
| author | 2023-04-14 19:17:16 +0200 | |
|---|---|---|
| committer | 2023-04-14 19:17:16 +0200 | |
| commit | bd21d144de18bf67facef287705e34ba030b46d8 (patch) | |
| tree | 6297a76d751bc93d3be414b473e2470c27b022e6 /data.c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-bd21d144de18bf67facef287705e34ba030b46d8.tar.gz snac2-bd21d144de18bf67facef287705e34ba030b46d8.tar.xz snac2-bd21d144de18bf67facef287705e34ba030b46d8.zip | |
New function timeline_touch().
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 9 |
1 files changed, 9 insertions, 0 deletions
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <time.h> | 14 | #include <time.h> |
| 15 | #include <sys/stat.h> | 15 | #include <sys/stat.h> |
| 16 | #include <sys/file.h> | 16 | #include <sys/file.h> |
| 17 | #include <sys/time.h> | ||
| 17 | #include <fcntl.h> | 18 | #include <fcntl.h> |
| 18 | #include <pthread.h> | 19 | #include <pthread.h> |
| 19 | 20 | ||
| @@ -870,6 +871,14 @@ double timeline_mtime(snac *snac) | |||
| 870 | } | 871 | } |
| 871 | 872 | ||
| 872 | 873 | ||
| 874 | int timeline_touch(snac *snac) | ||
| 875 | /* changes the date of the timeline index */ | ||
| 876 | { | ||
| 877 | xs *fn = xs_fmt("%s/private.idx", snac->basedir); | ||
| 878 | return utimes(fn, NULL); | ||
| 879 | } | ||
| 880 | |||
| 881 | |||
| 873 | xs_str *timeline_fn_by_md5(snac *snac, const char *md5) | 882 | xs_str *timeline_fn_by_md5(snac *snac, const char *md5) |
| 874 | /* get the filename of an entry by md5 from any timeline */ | 883 | /* get the filename of an entry by md5 from any timeline */ |
| 875 | { | 884 | { |