Subject: RE: ctime vs. Create Time

From: Richard Whalen <[email-masked]>
Date: Mon, 7 Oct 2002 09:52:31 -0400

> -----Original Message-----
> From: Joseph Galbraith [mailto:[email-masked]]
> Sent: Monday, October 07, 2002 9:32 AM
> To: [email-masked]
> Subject: ctime vs. Create Time
> 
> 
> Hi all,
> 
> In the 'draft-draft' version of the sftp draft, 
> I added a ctime field.  Then, in the course of
> some other work I was doing, I actually looked
> at what the ctime field meant.
> 
> Here is the text describing both the ctime and
> mtime fields from the linux man page:
> 
>        The  field st_mtime is changed by file modifications, e.g.
>        by mknod(2), truncate(2), utime(2) and write(2)  (of  more
>        than  zero  bytes).   Moreover, st_mtime of a directory is
>        changed by the creation  or  deletion  of  files  in  that
>        directory.   The st_mtime field is not changed for changes
>        in owner, group, hard link count, or mode.
> 
>        The field st_ctime is changed by  writing  or  by  setting
>        inode  information  (i.e., owner, group, link count, mode,
>        etc.).
> 
> Now, thats not what I thought at all!  I thought the 'c' in
> ctime stood for create.  (You may even notice that in the
> paragraph describing 'atime', 'ctime', and 'mtime', I said
> that ctime was 'creation' time.
> 
> Under windows, the creation time of a file is stored, and I
> was looking for the ability to perserve that value.
> 
> So, in my working copy I've changed ctime into 'createtime'.
> 
> I'm not sure I see a need for both mtime and ctime. Do people
> think we need both?
> 
> What do people think about create time?
> 
> - Joseph
> 

The compiler I use didn't like ctime, so I ended up changing the field name
to be creation_time.
I like the idea of having creation time available (as a true creation time),
as it allows a method of determining whether a file with a particular name
and a change in modification time means that a file was modified, or whether
it is an entirely new file with the same name as a previous file.

Some systems may not be able to report some times - VMS does not generally
record read-only access to a file, so there is no difference between atime
and mtime.

If your question is about "needing" a "ctime" in the linux concept of
"ctime", then I agree that there is no need for both "ctime" and "mtime".

----------------------
Richard Whalen
Process Software

---

From: "Joseph Galbraith" <[email-masked]>
Date: Mon, 7 Oct 2002 07:52:33 -0600

> "ctime", then I agree that there is no need for both "ctime" and "mtime".

Yes, that was my question.

- Joseph