commit 5046531
default
·
2023-04-12 07:46:42 +0000 UTC
parent 93008cf
New functions object_ctime() and object_ctime_by_md5().
M
data.c
+14,
-0
1@@ -658,6 +658,20 @@ int object_del_if_unref(const char *id)
2 }
3
4
5+double object_ctime_by_md5(const char *md5)
6+{
7+ xs *fn = _object_fn_by_md5(md5);
8+ return f_ctime(fn);
9+}
10+
11+
12+double object_ctime(const char *id)
13+{
14+ xs *md5 = xs_md5_hex(id, strlen(id));
15+ return object_ctime_by_md5(md5);
16+}
17+
18+
19 d_char *_object_index_fn(const char *id, const char *idxsfx)
20 /* returns the filename of an object's index */
21 {
M
snac.h
+2,
-0
1@@ -77,6 +77,8 @@ int object_get_by_md5(const char *md5, xs_dict **obj);
2 int object_get(const char *id, xs_dict **obj);
3 int object_del(const char *id);
4 int object_del_if_unref(const char *id);
5+double object_ctime_by_md5(const char *md5);
6+double object_ctime(const char *id);
7 int object_admire(const char *id, const char *actor, int like);
8
9 int object_likes_len(const char *id);