You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "Manfred Schuh (CESOFT GmbH, Bielefeld)" <sc...@cesoft.de> on 2003/07/04 10:16:59 UTC

time of apr_file_copy destination on win32 - update

hi,

if I copy a file using apr_file_copy under WIN32 the destination file has
the actual
time as modification time.
I would have expected the modification time being the same as the source
file as e.g. as
WIN32 CopyFile does?

my test program copy input.txt to input.apr using apr_file_copy and
to apr.dos using DosCopy

cc:/tmp/input.txt C:-1386468208 M:246172 A:-1354707840
C:Fri Jul 04 09:26:37 2003 M:Thu Jan 23 09:30:26 2003 A:Fri Jul 04 00:00:00
2003
c:/tmp/input.apr C:-1378568208 M:246172 A:1841792
C:Fri Jul 04 09:26:45 2003 M:Fri Jul 04 09:49:46 2003 A:Fri Jul 04 00:00:00
2003
c:/tmp/input.dos C:-1378568208 M:246172 A:-1354707840
C:Fri Jul 04 09:26:45 2003 M:Thu Jan 23 09:30:26 2003 A:Fri Jul 04 00:00:00
2003

you see the creation time is identical (but both wrong - should be either
identical to the normal time or the actual time which was 09:49)
the modifcation time is different - apr_file_copy sets the actual time -
DosCopy uses the modification time of the source

Mit freundlichen Grüßen

Manfred Schuh

CESOFT Softwareentwicklung GmbH
Herforder Straße 155 a
D-33609 Bielefeld

Fon +49 (521) 9 32 31-0
Fax +49 (521) 9 32 31-11

Mail <ma...@cesoft.de>
Web <http://www.cesoft.de/>




Re: time of apr_file_copy destination

Posted by Branko Čibej <br...@xbc.nu>.
Manfred Schuh (CESOFT GmbH, Bielefeld) wrote:

>hi,
>
>if I copy a file using apr_file_copy the destination file has the actual
>time as creation time.
>I would have expected the time being the same as the source file as e.g. as
>WIN32 CopyFile does?
>
It doesn't. :-) The creation time of the copy is always the current
time, but the modification time is the same as the source's. It's quite
possible on Windows to have a file that looks like it was created after
it was modified.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/