On Mon, 4 May 2009, Morten Welinder wrote:
You want something like this...
Now that I have a somewhat better understanding of how libgsf
works, here's a suggestion for a patch (attached). It adds the
ability to read the timestamp from files inside a zip archive, and
to set the time stamp on files created via stdio. So you can
emulate 'unzip' by doing something like:
gint mtime;
/* 'input' is a GsfInput from zip */
g_object_get(G_OBJECT(input), "modification-time", &mtime, NULL);
...
/* 'out' is obtained via gsf_outfile_stdio_new */
output = gsf_outfile_new_child_full(out, name, is_dir,
"modification-time", mtime,
NULL);
The use of gint for mtime expires in 2038; if there's a better way
of handling time_t via g_object that would be good.
--
Allin Cottrell
Department of Economics
Wake Forest University
Attachment:
mtime.patch
Description: Text document