The filetype() function returns the file type of file or directory.
Possible return values are fifo, char, dir, block, link, file, socket and unknown.
Syntax
filetype(filename)
Example
echo filetype("content.txt");
Output
file
Copyright ©2022 coderraj.com. All Rights Reserved.