JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add enc_mtime
[wfpl.git] / encode.php
index c18f723..38de080 100644 (file)
@@ -462,3 +462,12 @@ function enc_linkify($str) {
        }
        return $ret;
 }
+
+# turns a filename into the unix timestamp of that files modification date
+function enc_mtime($dummy, $filename) {
+       $stat = stat($filename);
+       if ($stat === false) {
+               return '';
+       }
+       return '' . $stat['mtime'];
+}