YouTip LogoYouTip

Func Filesystem Is Dir

## PHP is_dir() Function **PHP Filesystem Function** ## Definition and Usage is_dir() function checks whether the specified file is a directory. **Note**: The result of this function is cached. Please use clearstatcache() to clear the cache. ```php bool is_dir ( string $filename ) ``` ## Parameters | Parameter | Description | |-----------|-------------| | filename | File path. | ## Return Value Returns TRUE if the file exists and is a directory, otherwise FALSE. ## Examples ### Example 1 ```php ``` Output: ``` /var/www/html/index.php is not a directory ``` ### Example 2 ```php ``` Output: ``` /var/www/html/ is a directory ``` ## [PHP file_exists() - Check whether file or directory exists]( [PHP is_file() - Determine whether the given filename is a file]( [PHP is_link() - Determine whether the given filename is a symbolic link]( [PHP is_readable() - Determine whether the given filename is readable]( [PHP is_writable() - Determine whether the given filename is writable]( [PHP is_executable() - Determine whether the given filename is executable]( [PHP clearstatcache() - Clear file status cache]( [PHP filetype() - Return the file type](

## Comments <!-- function submitRating() { var url = " var title = "PHP is_dir() functions"; var rating
← Func Filesystem Is ExecutableFunc Filesystem Glob β†’