Re: reply>> my first newbie question
Dan Weeks <[email protected]>
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Organization | Wild Brain, Inc. |
| Message-ID | <[email protected]> |
>>>>> "JS" == "Jacob Smullyan" <[email protected]>: JS> Hi -- JS> JS> I believe that ctime is supposed to be change time, not creation time, JS> but there is confusion about this; you'll find textbooks that talk JS> about it as creation time, and others that talk about how that is a JS> misunderstanding. I'm not sure what POSIX has to say about this, or JS> whether that matters, since obviously different platforms deal with it JS> differently. JS> JS> Perhaps we can add a configure test that checks for this and use mtime JS> for platforms that give creation-time semantics for ctime. I seem to JS> recall that there was a reason ctime was preferable to use than mtime, JS> but I've forgotten what it was. Drew, do you remember our discussion JS> of this back in 2001? to the best of my understanding ctime on a unix system should always be change time of the file status information. there is no storage of creation time in the filesystem for most unix systems. if you looks at the stat(2) struct you see: time_t st_atime; /* time of last access */ time_t st_mtime; /* time of last modification */ time_t st_ctime; /* time of last change */ and it says: The field st_ctime is changed by writing or by setting inode informa- tion (i.e., owner, group, link count, mode, etc.). that's the only use of ctime i've ever known. I think on Windows there is a way to get creation time, but I've not worked on win32 systems in a long long time. -dan ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/