A class to provide utilities for manipulating files by their type.
| package |
CMS |
|---|---|
| license |
GPL |
| author |
Robert Campbell calguy1000@cmsmadesimple.org |
| since | 2.2 |
__construct(\CMSMS\cms_config $config)
\CMSMS\cms_config $configupdate_config_extensions(string $member, string $str)
string $memberOne of (_archive_extensions, _audio_extensions, _video_extensions, _xml_extensions, _document_extensions)
string $strA comma separated string of extensions for that file type
is_readable(string $filename) : boolean
string $filename boolean
get_extension(string $filename) : string
string $filename string
get_mime_type(string $filename) : string
requires the finfo_open function.
string $filename string
is_image(string $filename) : boolean
This method will use the mime type if possible, otherwise an extension is used to determine if the file is an image.
string $filename boolean
is_thumb(string $filename) : boolean
string $filename boolean
is_archive(string $filename) : boolean
string $filename boolean
is_audio(string $filename) : boolean
string $filename boolean
is_video(string $filename) : boolean
string $filename boolean
is_media(string $filename) : boolean
string $filename boolean
is_xml(string $filename) : boolean
string $filename boolean
is_document(string $filename) : boolean
string $filename boolean
get_file_type(string $filename) : string
string $filename string
A FileType type constant describing the file type, if found.