https://github.com/lewiscowles1986/filesystem-file-extension-php
PHP File Extension Utility Library
https://github.com/lewiscowles1986/filesystem-file-extension-php
filesystem php-library php7 tiny-library
Last synced: about 1 year ago
JSON representation
PHP File Extension Utility Library
- Host: GitHub
- URL: https://github.com/lewiscowles1986/filesystem-file-extension-php
- Owner: Lewiscowles1986
- License: gpl-3.0
- Created: 2017-11-16T10:21:07.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2020-06-14T09:19:43.000Z (almost 6 years ago)
- Last Synced: 2024-07-06T22:43:13.381Z (almost 2 years ago)
- Topics: filesystem, php-library, php7, tiny-library
- Language: PHP
- Size: 64.5 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# filesystem-file-extension-php
PHP File Extension Utility Library
[](https://travis-ci.org/Lewiscowles1986/filesystem-file-extension-php)
[](https://coveralls.io/github/Lewiscowles1986/filesystem-file-extension-php?branch=master)
[](https://github.com/Lewiscowles1986/filesystem-file-extension-php/releases)
[](https://raw.githubusercontent.com/Lewiscowles1986/filesystem-file-extension-php/master/LICENSE)
## Details
### Runtime & Environment
#### Production
This should work with any [security supported version of PHP 7.x](https://www.php.net/supported-versions.php) line
#### Development
Additional requirements are required for development
* Composer
* doxygen
* xDebug
### Namespaces
`lewiscowles\Utils\FileSystem\Extension`
#### Methods provided
```php
fixExtensionIfNeeded (string $originalExtension, string $filename) : string
```
```php
getExtensionFromFilename (string $filename) : string
```
```php
hasNoExtension (string $filename) : bool
```
```php
isExtensionTooShort (string $extension) : bool
```
```php
isDualPartExtension (string $extension) : bool
```
```php
isDotFile (string $filename) : bool
```
## Purpose
This package was created solely for the purpose of facilitating the WordPress SVG plugin. It is my hope that it provides other benefit, but that has not been the case.
If you spot a bug, or have a feature-request or improvement, please [create an issue](/Lewiscowles1986/filesystem-file-extension-php/issues).
## Contributing
Documentation and Tests must be provided for any contribution. If this is a problem due to lack of knowledge or experience; please make an issue and submit a draft PR to ask for help. This should be a small enough library that learning can be helped.
At all times a polite and courteous tone should be used when communicating, contributing or interacting with this repository.