Skip to content

damog/File-MimeInfo-Simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME
    File::MimeInfo::Simple - Simple implementation to determine file type

USAGE
     use File::MimeInfo::Simple;
     say mimetype("/Users/damog/vatos_rudos.jpg"); # prints out 'image/jpeg'
     say mimetype("C:\perl\foo.pl") # prints out 'application/x-perl'

DESCRIPTION
    "File::MimeInfo::Simple" is a much simpler implementation and uses a
    much simpler approach than "File::MimeInfo", using the 'file' command on
    a UNIX-based operating system. Windows uses a key-value list for
    extensions. It's inspired on Matt Aimonetti's mimetype-fu used on Ruby
    and the Rails world.

FUNCTIONS
  mimetype( $filename )
    "mimetype" is exported by default. It receives a parameter, the file
    path. It returns an string containing the mime type for the file.

AUTHOR
    David Moreno <david@axiombox.com>.

LICENSE
    Copyright 2009 David Moreno.

    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

About

Simple implementation to determine file type

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages