Connecting Tech Pros Worldwide Forums | Help | Site Map

Finding Date File Created

Robizzle
Guest
 
Posts: n/a
#1: Oct 13 '05
Sorry, I must be blind but I can't seem to find it anywhere.

What function will return the time a file was created? I see
filemtime(...) returns the time that file was last Modified and
fileatime(...) returns the time that a file was last accessed but what
about created? Tried php.net and google, nothing =(


Gordon Burditt
Guest
 
Posts: n/a
#2: Oct 13 '05

re: Finding Date File Created


>Sorry, I must be blind but I can't seem to find it anywhere.

What do you consider the DEFINITION of "file created" for the purpose
of such a time? In light of such a definition, what does the time
the file was created *MEAN*? I am thinking of such subtle differences
as: (a) a compiler writes over an existing object file, thus *NOT*
changing the create time, vs. (b) a compiler deletes and re-creates
an object file, thus changing the create time. But is there really
a difference between these two cases, since none of the older
contents of the file remains, nor is there any detectable difference
other than the creation time?

If you aren't very careful with the definition of creation time,
the whole thing becomes pretty useless.
[color=blue]
>What function will return the time a file was created? I see
>filemtime(...) returns the time that file was last Modified and
>fileatime(...) returns the time that a file was last accessed but what
>about created? Tried php.net and google, nothing =([/color]

TRSDOS II tracked a creation time and modification time, but I doubt
anyone cares any more.

FreeBSD actually tracks such a time but only on a UFS2 filesystem with
FreeBSD 5.0 or greater. Most versions of UNIX track accessed time,
modified time, and inode-changed time, not creation time.

Gordon L. Burditt
Chuck Anderson
Guest
 
Posts: n/a
#3: Oct 13 '05

re: Finding Date File Created


Robizzle wrote:
[color=blue]
>Sorry, I must be blind but I can't seem to find it anywhere.
>
>What function will return the time a file was created? I see
>filemtime(...) returns the time that file was last Modified and
>fileatime(...) returns the time that a file was last accessed but what
>about created? Tried php.net and google, nothing =(
>[/color]
From what I've read, Unix does not keep a file creation time.

In Windows filectime will return the creation time.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Integrity is obvious.
The lack of it is common.
*****************************
Closed Thread