Name

filetype

Synopsis

string filetype(string path)

Returns the type of file given in path. The possible types are:

Fifo

The file is a fifo pipe.

Char

The file is a text file.

Dir

path is a directory.

Block

A block reserved for use by the filesystem.

Link

The file is a symbolic link.

File

The file contains binary data.

unknown

The file’s type could not be determined.

Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.