You are here: Home » Reply

Reply To: File date as criterai for smartlist



@fizze wrote:

so theres actually no such thing as the last file modification/creation date according to the os/fs ?

Those are two different things.

You can almost get those things from a stat(2) call:

st_mtime Time when file data last modified. Changed by the mknod(2),
utimes(2) and write(2) system calls.

st_ctime Time when file status was last changed (inode data modifica-
tion). Changed by the chmod(2), chown(2), link(2),
mknod(2), rename(2), unlink(2), utimes(2) and write(2) sys-
tem calls.

mtime is definately last modified time, but ctime isn’t exactly creation time. So no, there really isn’t a creation date. Not one available via POSIX, anyway.

— Ron