0.07
No commit activity in last 3 years
No release in over 3 years
shared-mime-info is a pure Ruby library for accessing the MIME info database provided by Freedesktop
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

shared-mime-info¶ ↑

shared-mime-info is a pure Ruby library for accessing the MIME info database provided by Freedesktop on Standards/shared-mime-info-spec.

Project¶ ↑

The rubyforge project : rubyforge.org/projects/shared-mime

The github repository: github.com/hanklords/shared-mime-info/tree/master

Usage¶ ↑

require 'shared-mime-info'

MIME.check 'sample.jpg'  # => #<MIME::Type  ...,  @type="image/jpeg">

MIME['image/jpeg'].match_filename? 'sample.jpg' # => true

Notes¶ ↑

  • Ensure that shared-mime-info is installed on the system:

> brew install shared-mime-info
  • You may need to update the mime database first:

> update-mime-database