changeset 2765:407334574789

Include file ctime as a formatted tag Include ctime as the formatted tag: file.ctime
author Colin Clark <colin.clark@cclark.uk>
date Thu, 31 May 2018 11:20:22 +0100
parents 4ef24fe642b5
children 81f6ca27b710
files doc/docbook/GuideSidebarsInfo.xml src/exif-common.c
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/docbook/GuideSidebarsInfo.xml	Mon May 28 10:05:33 2018 +0100
+++ b/doc/docbook/GuideSidebarsInfo.xml	Thu May 31 11:20:22 2018 +0100
@@ -288,6 +288,10 @@
             <entry>file.mode</entry>
             <entry>file mode flags</entry>
           </row>
+          <row>
+            <entry>file.ctime</entry>
+            <entry>refer to operating system documentation for the meaning of ctime</entry>
+          </row>
         </tbody>
       </tgroup>
     </table>
--- a/src/exif-common.c	Mon May 28 10:05:33 2018 +0100
+++ b/src/exif-common.c	Thu May 31 11:20:22 2018 +0100
@@ -876,6 +876,7 @@
 	{"file.size",				N_("File size"), 	NULL},
 	{"file.date",				N_("File date"), 	NULL},
 	{"file.mode",				N_("File mode"), 	NULL},
+	{"file.ctime",				N_("File ctime"), 	NULL},
 	{ NULL, NULL, NULL }
 };
 
@@ -1136,6 +1137,10 @@
 		{
 		return mode_number(fd->mode);
 		}
+	if (strcmp(key, "file.ctime") == 0)
+		{
+		return g_strdup(text_from_time(fd->cdate));
+		}
 	return g_strdup("");
 }