CreateFile() create time

  • Follow


Hi,
Can anyone explain the reasoning behind the fact that a successful
DeleteFile(<fn>) followed by a successful
CreateFile(<fn>...,CREATE_NEW..) sets the file creation time to the
old creation time rather than the current system time.  I understand
that it is using a cached value, just not the reason why.  I also
understand that I can set the file creation time to any time of my
choosing, but not sure why I should have to?
This behavior is confirmed on Windows XP NTFS file systems and I
expect it is consistent across all windows os's.
Thanks for any info.
-- 
Kevin English
0
Reply Kevin 7/28/2010 1:29:32 AM

On 28 July, 11:29, Kevin English <kengl...@4csoftware.com> wrote:
> Hi,
> Can anyone explain the reasoning behind the fact that a successful
> DeleteFile(<fn>) followed by a successful
> CreateFile(<fn>...,CREATE_NEW..) sets the file creation time to the
> old creation time rather than the current system time. =A0I understand
> that it is using a cached value, just not the reason why. =A0I also
> understand that I can set the file creation time to any time of my
> choosing, but not sure why I should have to?
> This behavior is confirmed on Windows XP NTFS file systems and I
> expect it is consistent across all windows os's.
> Thanks for any info.
> --
> Kevin English

See http://blogs.msdn.com/b/oldnewthing/archive/2005/07/15/439261.aspx
0
Reply jon 7/28/2010 2:13:00 AM


On Tue, 27 Jul 2010 19:13:00 -0700 (PDT), jon <jpotter@gmail.com>
wrote:

>On 28 July, 11:29, Kevin English <kengl...@4csoftware.com> wrote:
>> Hi,
>> Can anyone explain the reasoning behind the fact that a successful
>> DeleteFile(<fn>) followed by a successful
>> CreateFile(<fn>...,CREATE_NEW..) sets the file creation time to the
>> old creation time rather than the current system time. 
>
>See http://blogs.msdn.com/b/oldnewthing/archive/2005/07/15/439261.aspx
Thanks.  I guess under some some circumstances I would have been
equally puzzled why the creation time wasn't preserved.  Also liked
the Quantum Mechanics analogy.
-- 
Kevin English
0
Reply Kevin 7/28/2010 2:47:28 AM

2 Replies
454 Views

(page loaded in 0.074 seconds)

Similiar Articles:













7/22/2012 11:49:43 AM


Reply: