PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
johnhelen
Forum Commoner
Posts: 45 Joined: Mon Feb 19, 2007 9:17 pm
Post
by johnhelen » Wed Sep 12, 2007 6:29 pm
Hello all
Could you please tell me the function to know the created date of a folder
Many thanks
john
mrkite
Forum Contributor
Posts: 104 Joined: Tue Sep 11, 2007 4:19 am
Post
by mrkite » Wed Sep 12, 2007 6:44 pm
stat() would do it.
Zoxive
Forum Regular
Posts: 974 Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan
Post
by Zoxive » Wed Sep 12, 2007 6:46 pm
If your on linux, you can use
exec() along with some linux command to show it..
(Just an example, im still new to linux)
Code: Select all
ls -l --time=ctime /var | grep "test"
Result
Code: Select all
drwxr-xr-x 18 kyle root 4096 2007-09-12 19:44 test
johnhelen
Forum Commoner
Posts: 45 Joined: Mon Feb 19, 2007 9:17 pm
Post
by johnhelen » Wed Sep 12, 2007 7:01 pm
Thanks
But stat() function is only for file, not for directory
exec() function is for only linux and I need for window as well
I need this as I need to delete folders (tmp) that is two weeks old in my system
Regards
mrkite
Forum Contributor
Posts: 104 Joined: Tue Sep 11, 2007 4:19 am
Post
by mrkite » Wed Sep 12, 2007 7:12 pm
johnhelen wrote:
But stat() function is only for file, not for directory
Since when? It works on directories just fine. At least it does under unix.. maybe windows is different?