delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/26/10:29:09

X-Spam-Check-By: sourceware.org
Date: Mon, 26 Mar 2007 17:28:45 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Cc: bug-findutils AT gnu DOT org
Subject: Re: Support for st_birthtime
Message-ID: <20070326152845.GD6306@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com, bug-findutils AT gnu DOT org
Mail-Followup-To: cygwin AT cygwin DOT com, bug-findutils AT gnu DOT org
References: <4607BCA0 DOT 1060406 AT byu DOT net> <c5df85930703260610i24ff9bb2i13a8d11ce63a6071 AT mail DOT gmail DOT com>
Mime-Version: 1.0
In-Reply-To: <c5df85930703260610i24ff9bb2i13a8d11ce63a6071@mail.gmail.com>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mar 26 14:10, James Youngman wrote:
> On 3/26/07, Eric Blake <ebb9 AT byu DOT net> wrote:
> >Corinna only replied to the cygwin list.  It looks like Windows will
> >populate st_birthtime with st_ctime when reading filesystems that don't
> >support birthtime.

Er, sorry, but I didn't say that.  I said that all Windows functions
returning filetimes will return a creation time.  We can only work with
the values given.  I never found a situation in which the creation time
is not set.  And if it's set, we must trust the value.

Native Windows file systems always maintain a real creation time and
Samba fakes it.  Samba sets the creation time to the minimum value of
the stat members st_ctime, st_mtime and st_atime.

The only timestamp I ever found to be 0 is the ChangeTime.  This is the
fourth timestamp maintained by the SMB protocol as well as by native NT
functions and it's meaning is equivalent to st_ctime.  This timestamp is
not returned by Win32 funtions, but Cygwin uses the native NT functions
so we get a valid st_ctime as long as the file system supports it.  NTFS
returns a valid ChangeTime.  FAT returns 0, in which case Cygwin sets
st_ctime = st_mtime.

Unfortunately Samba sets the ChangeTime not to st_ctime, but to
st_mtime, even if the underlying filesystem supports st_ctime.  However,
as I mentioned above, if the timestamp is valid, we have to trust it.
We have no other way to evaluate a value.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019