RE: [Rest2web-develop] Bug & feature request about file keyword in restindex
Brought to you by:
mjfoord
From: Andrew I. <and...@us...> - 2006-01-30 05:14:25
|
Fuzzyman: Regarding the timestamp, make 2 calls: shutil.copyfile(src, dest) shutil.copystat(src, dest) The second method should (according to the docs) "Copy the permission bits, last access time, and last modification time from src to dest. The file contents, owner, and group are unaffected." Andrew > -----Original Message----- > From: res...@li... > [mailto:res...@li...]On Behalf Of > Fuzzyman > Sent: Sunday, January 29, 2006 9:01 AM > To: res...@li... > Subject: Re: [Rest2web-develop] Bug & feature request about file keyword > in restindex > > > Andrew Ittner wrote: > > (This e-mail started as part of a private exchange; per > Fuzzyman's request > > I'm posting it to the dev list.) > > > > [files get copied on every build] > > [snip..] > > > > I can get rest2web to check the compare directory first > though. Should it > > check file contents or just the timestamp ? > > Me: > > Have it check the timestamp. I don't see a need to compare > file contents > > just yet - and that may be unnecessary anyway, as I can always > dump the file > > into the output directory without using rest2web. > > > > > But if copying the file changes the timestamp... then it will compare > differently each time. (I use ``shutil.copyfile`` I *think*.) > > Perhaps comparing contents is the thing to do... > > The other issue definitely smells like a bug. I'll fix it. :-) > > Thanks for the feedback. > > Fuzzyman > http://www.voidspace.org.uk/python/index.shtml |