php man page for filetype

Query: filetype

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

FILETYPE(3)								 1							       FILETYPE(3)

filetype - Gets file type

SYNOPSIS
string filetype (string $filename)
DESCRIPTION
Returns the type of the given file.
PARAMETERS
o $filename - Path to the file.
RETURN VALUES
Returns the type of the file. Possible values are fifo, char, dir, block, link, file, socket and unknown. Returns FALSE if an error occurs. filetype(3) will also produce an E_NOTICE message if the stat call fails or if the file type is unknown.
EXAMPLES
Example #1 filetype(3) example <?php echo filetype('/etc/passwd'); // file echo filetype('/etc/'); // dir ?>
ERRORS
/EXCEPTIONS Upon failure, an E_WARNING is emitted.
NOTES
Note 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 ALSO
is_dir(3), is_file(3), is_link(3), file_exists(3), mime_content_type(3), pathinfo(3), stat(3). PHP Documentation Group FILETYPE(3)
Related Man Pages
is_executable(3) - php
is_readable(3) - php
file_exists(3) - php
is_dir(3) - php
fileowner(3) - php
Similar Topics in the Unix Linux Community
stat() fails!!! what can i do?
grep Question
Not able to assign a value to variable
How to move files based on filetype and time created?
Help with stat command