Include file ctime as a formatted tag
authorColin Clark <colin.clark@cclark.uk>
Thu, 31 May 2018 10:20:22 +0000 (11:20 +0100)
committerColin Clark <colin.clark@cclark.uk>
Thu, 31 May 2018 10:20:22 +0000 (11:20 +0100)
Include ctime as the formatted tag: file.ctime

doc/docbook/GuideSidebarsInfo.xml
src/exif-common.c

index 3313415..c960c4b 100644 (file)
             <entry>file.mode</entry>\r
             <entry>file mode flags</entry>\r
           </row>\r
+          <row>\r
+            <entry>file.ctime</entry>\r
+            <entry>refer to operating system documentation for the meaning of ctime</entry>\r
+          </row>\r
         </tbody>\r
       </tgroup>\r
     </table>\r
index bf47562..a54f138 100644 (file)
@@ -876,6 +876,7 @@ ExifFormattedText ExifFormattedList[] = {
        {"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 @@ gchar *metadata_file_info(FileData *fd, const gchar *key, MetadataFormat format)
                {
                return mode_number(fd->mode);
                }
+       if (strcmp(key, "file.ctime") == 0)
+               {
+               return g_strdup(text_from_time(fd->cdate));
+               }
        return g_strdup("");
 }