Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xuchunyang/file-mime-type.el

Get file's mime type via file(1)
https://github.com/xuchunyang/file-mime-type.el

Last synced: about 1 month ago
JSON representation

Get file's mime type via file(1)

Awesome Lists containing this project

README

        

# `file-mime-type.el`
[![Build Status](https://travis-ci.org/xuchunyang/file-mime-type.el.svg?branch=master)](https://travis-ci.org/xuchunyang/file-mime-type.el)

;; Get file's mime type via file(1):
;;
;; (file-mime-type user-init-file)
;; ;; => "text/x-lisp"
;;
;; (file-mime-type (expand-file-name "~/Pictures/org-mode-unicorn.svg"))
;; ;; => "image/svg+xml"
;;
;; (file-mime-type-batch '("README.md" "Makefile"))
;; ;; => ("text/plain" "text/x-makefile")