Lewiscowles1986 / filesystem-file-extension-php

PHP File Extension Utility Library
GNU General Public License v3.0
1 stars 2 forks source link
filesystem php-library php7 tiny-library

filesystem-file-extension-php

PHP File Extension Utility Library

Build Status Coverage Status Latest Version GitHub License

Details

Runtime & Environment

Production

This should work with any security supported version of PHP 7.x line

Development

Additional requirements are required for development

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.