lewiscowles / file-extension-utils
Utilities for dealing with file extensions
Requires
- php: >=7.2
Requires (Dev)
- ext-xdebug: *
- php-coveralls/php-coveralls: *
- phpunit/phpunit: ^6.0
This package is not auto-updated.
Last update: 2024-12-22 06:16:11 UTC
README
PHP File Extension Utility Library
Details
Runtime & Environment
Production
This should work with any security supported version of PHP 7.x line
Development
Additional requirements are required for development
- Composer
- doxygen
- xDebug
Namespaces
lewiscowles\Utils\FileSystem\Extension
Methods provided
fixExtensionIfNeeded (string $originalExtension, string $filename) : string
getExtensionFromFilename (string $filename) : string
hasNoExtension (string $filename) : bool
isExtensionTooShort (string $extension) : bool
isDualPartExtension (string $extension) : bool
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.
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.