Store and retrieve file change time

This introduces a new header with the change time; existing objects
will report modification time.  Fixes #771.
This commit is contained in:
Andrew Gaul
2019-01-06 17:51:42 -08:00
parent b68d97c6bf
commit 2c43b1e12b
8 changed files with 118 additions and 12 deletions

View File

@ -169,3 +169,19 @@ function run_suite {
return 0
fi
}
function get_ctime() {
if [ `uname` = "Darwin" ]; then
stat -f "%c" "$1"
else
stat -c %Z "$1"
fi
}
function get_mtime() {
if [ `uname` = "Darwin" ]; then
stat -f "%m" "$1"
else
stat -c %Y "$1"
fi
}