*finfo_file* -- Return information about a file

Procedural style

  string finfo_file(resource finfo, string file_name [, int options [, resource context]])~

Object oriented style

  string file(resource finfo, string file_name [, int options [, resource context, string file_name [, int options [, resource context]]]])~

This function is used to get information about a file.

{finfo} Fileinfo resource returned by |finfo_open|.

{file_name} Name of a file to be checked.

{options} One or disjunction of more Fileinfo constants.

{context} For a description of contexts, refer to .

Returns a textual description of the contents of the {filename} argument, or
FALSE if an error occurred.

A |finfo_file| example

<?php >
  $finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
  foreach (glob("*") as $filename) {
      echo finfo_file($finfo, $filename) . "\n";
  }
  finfo_close($finfo);
?>

The above example will output something similar to:

  text/html
  image/gif
  application/vnd.ms-excel



|finfo_buffer|

vim:ft=help:
