| Recommend this page to a friend! |
| Info | Documentation | Reputation | Support forum | Blog | Links |
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2025-07-31 (-6 hours ago) | Not enough user ratings | Total: 372 | All time: 6,795 This week: 71 | |||||
| Version | License | PHP version | Categories | |||
| file-info 0.1.18 | GNU General Publi... | 5.3 | PHP 5, Files and Folders |
| Description | Author | ||||||||
This class can get several types of information about files. |
|
[![Build Status][build-img]][build-url] [![Code Climate][gpa-img]][gpa-url] [![Test Coverage][coverage-img]][coverage-url]
Provides a simple and flexible API wrapper around PHP's pathinfo method.
The recommended way of installing this package is through Composer:
$ composer require nbish11/fileinfo
<?php
require 'vendor/autoload.php';
$finfo = new FileInfo('C:/path/to/file.txt');
// Using standard API methods:
echo $finfo->getDirectory(); // 'C:/path/to/'
echo $finfo->getBaseName(); // 'file.txt'
echo $finfo->getExtension(); // 'txt'
echo $finfo->getFileName(); // 'file'
echo $finfo->getMimeType(); // 'text/plain'
// Using class properties:
echo $finfo->directory; // 'C:/path/to/'
echo $finfo->basename; // 'file.txt'
echo $finfo->extension; // 'txt'
echo $finfo->filename; // 'file'
echo $finfo->mimetype; // 'text/plain'
> Please see CONTRIBUTING.
> Copyright © 2016 Nathan Bishop > > Please see LICENSE for more information.
[build-url]: https://travis-ci.org/nbish11/FileInfo [build-img]: https://travis-ci.org/nbish11/FileInfo.svg?branch=master [gpa-url]: https://codeclimate.com/github/nbish11/FileInfo [gpa-img]: https://codeclimate.com/github/nbish11/FileInfo/badges/gpa.svg [coverage-url]: https://codeclimate.com/github/nbish11/FileInfo/coverage [coverage-img]: https://codeclimate.com/github/nbish11/FileInfo/badges/coverage.svg
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Lic. | License text | |||
| Doc. | Documentation | |||
| / | src |
| File | Role | Description |
|---|---|---|
| |
Class | Class source |
| |
Data | Auxiliary data |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% |
|
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.