Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Is a file a directory



2:30 pm on Oct 13, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

I have a program that moves/renames files based on a search text inputted by the user. Is there a function that checks to see if a path is a directory and not a file. This is the logic I'm looking for

if(the path given is a file and not a folder){

do some code;


do some code;


Receptional Andy

2:32 pm on Oct 13, 2008 (gmt 0)

Don't forget the PHP manual, andrewsmd ;)



8:19 pm on Oct 13, 2008 (gmt 0)

5+ Year Member

think there's is_dir / is_file

agreed :) check the manual


Featured Threads

Hot Threads This Week

Hot Threads This Month