# File Information

# Introduction

The functions in this module try to guess the content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file. While this is not a bullet proof approach the heuristics used do a very good job.

- Installing/Configuring
  - Installation
  - Resource Types
- Predefined Constants
- Fileinfo Functions
  - finfo_buffer — Return information about a string buffer
  - finfo_close — Close finfo instance
  - finfo_file — Return information about a file
  - finfo_open — Create a new finfo instance
  - finfo_set_flags — Set libmagic configuration options
  - mime_content_type — Detect MIME Content-type for a file
- finfo — The finfo class
  - finfo::buffer — Alias of finfo_buffer()
  - finfo::__construct — Alias of finfo_open
  - finfo::file — Alias of finfo_file()
  - finfo::set_flags — Alias of finfo_set_flags()

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open