Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-01-09 (9 months ago) | Not enough user ratings | Total: 372 | All time: 6,792 This week: 71 |
Version | License | PHP version | Categories | |||
file-info 0.1.13 | 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
Files (8) |
File | Role | Description | ||
---|---|---|---|---|
src (2 files) | ||||
tests (1 file) | ||||
.codeclimate.yml | Data | Auxiliary data | ||
CONDUCT.md | Data | Auxiliary data | ||
CONTRIBUTING.md | Data | Auxiliary data | ||
LICENSE.md | Lic. | License text | ||
README.md | Doc. | Documentation |
Files (8) | / | src |
File | Role | Description |
---|---|---|
FileInfo.php | Class | Class source |
mediatypes.json | 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. |
Install with Composer |
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.