Forum Moderators: coopster

Message Too Old, No Replies

How to get the 'file to a directory addition' date

date file directory

         

bramcorleone

1:02 pm on Jan 3, 2008 (gmt 0)

10+ Year Member



I need a function, that gets the exact time of the placement of a file in a directory.

Can anyone help me out here?!

PHP_Chimp

1:36 pm on Jan 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could have a look at filectime [uk.php.net]
However
Note: Note also that in some Unix texts the ctime of a file is referred to as being the creation time of the file. This is wrong. There is no creation time for Unix files in most Unix filesystems.

So there may not be any way for you to actually get the file creation time from the system. If you need that information (and filectime doesnt help you) then you may need to look at a creating another file with the creation dates in.

<edit>
Just noticed that was your first post, so welcome to Webmaster World :)

[edited by: PHP_Chimp at 1:38 pm (utc) on Jan. 3, 2008]

bramcorleone

8:52 pm on Jan 3, 2008 (gmt 0)

10+ Year Member



filectime was indeed the function I needed and my script is up and running! Thanks a lot!