Query: is_dir
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IS_DIR(3) 1 IS_DIR(3) is_dir - Tells whether the filename is a directorySYNOPSISbool is_dir (string $filename)DESCRIPTIONTells whether the given filename is a directory.PARAMETERSo $filename - Path to the file. If $filename is a relative filename, it will be checked relative to the current working directory. If $file- name is a symbolic or hard link then the link will be resolved and checked. If you have enabled safe mode, or open_basedir further restrictions may apply.RETURN VALUESReturns TRUE if the filename exists and is a directory, FALSE otherwise.EXAMPLESExample #1 is_dir(3) example <?php var_dump(is_dir('a_file.txt')); var_dump(is_dir('bogus_dir/abc')); var_dump(is_dir('..')); //one dir up ?> The above example will output: bool(false) bool(false) bool(true)ERRORS/EXCEPTIONS Upon failure, an E_WARNING is emitted.NOTESNote The results of this function are cached. See clearstatcache(3) for more details. Tip As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine which wrappers support stat(3) family of functionality.SEE ALSOchdir(3), dir(3), opendir(3), is_file(3), is_link(3). PHP Documentation Group IS_DIR(3)
Related Man Pages |
---|
opendir(3) - php |
filesize(3) - php |
fileowner(3) - php |
is_file(3) - php |
is_writable(3) - php |
Similar Topics in the Unix Linux Community |
---|
Display filename and wc stats |
use metacharacters to extract date |
count files in dir except one |
Select max value based on filename |
Bash syntax behaviour : [[ vs [ |