My working unpac space for OCaml projects in development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge opam/patches/magic-mime

+1188
+4
vendor/opam/magic-mime/.gitignore
··· 1 + _build 2 + .merlin 3 + *.install 4 + .*.swp
+62
vendor/opam/magic-mime/CHANGES.md
··· 1 + v1.3.1 2023-10-04 2 + ----------------- 3 + 4 + * Add WebAssembly (wasm) mime type (@vouillon #28, fixes #27 reported by @glondu) 5 + 6 + v1.3.0 2022-10-31 7 + ----------------- 8 + 9 + * Allow an optional default if the MIME type is unknown (@hannesm, #25) 10 + * Add a function to map MIME type to file extensions (@DolphinChips, #24) 11 + * Fix documentation (@MisterDA, #23) 12 + 13 + v1.2.0 2021-07-13 14 + ----------------- 15 + 16 + * Sync MIME types with latest from Apache (#22 @avsm) 17 + * Add `mjs` mapping to application/javascript manually (@avsm, request from @glondu) 18 + 19 + v1.1.3 2021-01-04 20 + ----------------- 21 + 22 + * Fix build system for cross-compilation (@TheLortex, #19). 23 + * Fix README (@seliopou, #18). 24 + * Fix opam metadata (@CraigFe, #17). 25 + 26 + v1.1.2 2019-08-12 27 + ----------------- 28 + 29 + * Actually port to dune by converting the `generator/` directory from 30 + jbuild to dune (@avsm). 31 + 32 + v1.1.1 2018-12-21 33 + ----------------- 34 + 35 + * Port build to Dune and fix the embedded compilation when 36 + the repository is included as a subdirectory in a larger 37 + Dune build. 38 + * Update opam metadata to 2.0 format. 39 + * Switch to using `dune-release` instead of `topkg` for releases. 40 + 41 + v1.1.0 2017-06-20 42 + ----------------- 43 + 44 + * Support a `map_file` which maps filenames onto MIME types, using 45 + a database based on GTKSourceView lang files. This adds support 46 + for several `x-*` MIME type extensions as well which are unofficial 47 + but useful, including ones for common programming languages. 48 + (#4 by @zoggy) 49 + 50 + * Sync mime.types with Apache SVN and note its source in the README. 51 + 52 + v1.0.1 2017-05-25 53 + ----------------- 54 + 55 + * clarify LICENSE (ISC) 56 + * build and test against OCaml 4.03 and 4.04 57 + * build via jbuilder 58 + 59 + v1.0.0 (2015-02-08) 60 + ------------------- 61 + 62 + * Initial public release.
+13
vendor/opam/magic-mime/LICENSE.md
··· 1 + Copyright (c) 2015 Anil Madhavapeddy <anil@recoil.org> 2 + 3 + Permission to use, copy, modify, and distribute this software for any 4 + purpose with or without fee is hereby granted, provided that the above 5 + copyright notice and this permission notice appear in all copies. 6 + 7 + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+16
vendor/opam/magic-mime/Makefile
··· 1 + .PHONY: build clean test 2 + 3 + build: 4 + dune build @install 5 + 6 + test: 7 + dune runtest 8 + 9 + install: 10 + dune install 11 + 12 + uninstall: 13 + dune uninstall 14 + 15 + clean: 16 + dune clean
+33
vendor/opam/magic-mime/README.md
··· 1 + ## magic-mime -- map filenames to common MIME types 2 + 3 + This library contains a database of MIME types that maps filename extensions 4 + into MIME types suitable for use in many Internet protocols such as HTTP or 5 + e-mail. It is generated from the `mime.types` file found in Unix systems, but 6 + has no dependency on a filesystem since it includes the contents of the 7 + database as an ML datastructure. 8 + 9 + For example, here's how to lookup MIME types in the `utop` REPL: 10 + 11 + #require "magic-mime";; 12 + Magic_mime.lookup "/foo/bar.txt";; 13 + - : bytes = "text/plain" 14 + Magic_mime.lookup "bar.css";; 15 + - : bytes = "text/css" 16 + 17 + ### Internals 18 + 19 + The following files need to be edited to add MIME types: 20 + 21 + - mime.types: this is obtained by syncing from the Apache Foundation's 22 + [mime.types](https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) 23 + in the Apache Subversion repository. 24 + - x-mime.types: these are the extension types, so non-standard `x-` prefixes are used here. 25 + - file.types: full filenames of common occurrences that are useful to map onto a MIME type. 26 + OCaml-specific things like `opam` files show up here. 27 + 28 + ## More information 29 + 30 + * WWW: <https://github.com/mirage/ocaml-magic-mime> 31 + * E-mail: <mirageos-devel@lists.xenproject.org> 32 + * Issues <https://github.com/mirage/ocaml-magic-mime/issues> 33 + * Discourse: <https://discuss.ocaml.org> with the `mirageos` tag
+2
vendor/opam/magic-mime/dune-project
··· 1 + (lang dune 1.0) 2 + (name magic-mime)
+5
vendor/opam/magic-mime/files.types
··· 1 + text/x-makefile Makefile makefile 2 + text/x-plain META 3 + text/x-changelog ChangeLog 4 + text/x-plain Changes LICENSE README 5 + text/x-plain _oasis _tags opam
+3
vendor/opam/magic-mime/generator/dune
··· 1 + (executables 2 + (names generate_mime_types) 3 + (libraries str))
+83
vendor/opam/magic-mime/generator/generate_mime_types.ml
··· 1 + (* 2 + * Copyright (c) 2009-2015 Anil Madhavapeddy <anil@recoil.org> 3 + * 4 + * Permission to use, copy, modify, and distribute this software for any 5 + * purpose with or without fee is hereby granted, provided that the above 6 + * copyright notice and this permission notice appear in all copies. 7 + * 8 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 + *) 16 + 17 + (* Convert an Apache mime.types file into a static ML data structure. *) 18 + 19 + open Printf 20 + open Str 21 + 22 + let files = ref [] 23 + 24 + type mode = 25 + | Regular 26 + | Files 27 + | Mime 28 + let mode = ref Regular 29 + 30 + let set_mode mode' () = mode := mode' 31 + 32 + let options = [ 33 + "--files", Arg.Unit (set_mode Files), 34 + "Generate function mapping on filenames rather than on extensions" ; 35 + "--mime", Arg.Unit (set_mode Mime), 36 + "Generate function mapping MIME types to file extensions" ; 37 + ] 38 + 39 + let file_iter fn c = 40 + try while true do fn (input_line c) done 41 + with End_of_file -> () 42 + 43 + let _ = 44 + Arg.parse options (fun s -> files := s :: !files) 45 + (Printf.sprintf "Usage: %s [options]\nwhere options are:" Sys.argv.(0)); 46 + let mode = !mode in 47 + let fun_name, default_arg, default = 48 + match mode with 49 + | Regular -> "map_extension", "?(default= \"application/octet-stream\")", "default" 50 + | Files -> "map_file", "?(default= \"application/octet-stream\")", "default" 51 + | Mime -> "map_mime", "", "[]" 52 + in 53 + let dup = Hashtbl.create 101 in 54 + printf "(* This function is autogenerated by: %s *)\n" (String.concat " " (Array.to_list Sys.argv)); 55 + printf "let %s %s = function\n" fun_name default_arg; 56 + List.iter (fun fname -> 57 + let fin = open_in fname in 58 + file_iter (fun l -> 59 + match split (regexp "\t+") l with 60 + | [] -> () 61 + | [_] -> () 62 + | [mime;_] when String.length mime > 0 && mime.[0] = '#' -> () 63 + | [mime;exts] -> begin 64 + match mode with 65 + | Mime -> 66 + if not (Hashtbl.mem dup mime) then begin 67 + let format_list oc l = List.map String.escaped l |> String.concat "\"; \"" |> fprintf oc "[\"%s\"]" in 68 + printf " | \"%s\" -> %a\n" (String.escaped mime) format_list (split (regexp " +") exts); 69 + Hashtbl.add dup mime () 70 + end 71 + | _ -> 72 + List.iter (fun e -> 73 + if not (Hashtbl.mem dup e) then begin 74 + printf " | \"%s\" -> \"%s\"\n" (String.escaped e) (String.escaped mime); 75 + Hashtbl.add dup e () 76 + end 77 + ) (split (regexp " +") exts) 78 + end 79 + | _ -> () 80 + ) fin; 81 + close_in fin 82 + ) (List.rev !files); 83 + printf " | _ -> %s\n%!" default
+33
vendor/opam/magic-mime/magic-mime.opam
··· 1 + opam-version: "2.0" 2 + name: "magic-mime" 3 + synopsis: "Map filenames to common MIME types" 4 + description: """ 5 + This library contains a database of MIME types that maps filename extensions 6 + into MIME types suitable for use in many Internet protocols such as HTTP or 7 + e-mail. It is generated from the `mime.types` file found in Unix systems, but 8 + has no dependency on a filesystem since it includes the contents of the 9 + database as an ML datastructure. 10 + 11 + For example, here's how to lookup MIME types in the [utop] REPL: 12 + 13 + #require "magic-mime";; 14 + Magic_mime.lookup "/foo/bar.txt";; 15 + - : bytes = "text/plain" 16 + Magic_mime.lookup "bar.css";; 17 + - : bytes = "text/css" 18 + """ 19 + maintainer: "Anil Madhavapeddy <anil@recoil.org>" 20 + authors: ["Anil Madhavapeddy" "Maxence Guesdon"] 21 + license: "ISC" 22 + homepage: "https://github.com/mirage/ocaml-magic-mime" 23 + doc: "https://mirage.github.io/ocaml-magic-mime/" 24 + bug-reports: "https://github.com/mirage/ocaml-magic-mime/issues" 25 + dev-repo: "git+https://github.com/mirage/ocaml-magic-mime.git" 26 + depends: [ 27 + "ocaml" {>= "4.03.0"} 28 + "dune" 29 + ] 30 + build: [ 31 + ["dune" "subst"] {dev} 32 + ["dune" "build" "-p" name "-j" jobs] 33 + ]
+768
vendor/opam/magic-mime/mime.types
··· 1 + application/andrew-inset ez 2 + application/applixware aw 3 + application/atom+xml atom 4 + application/atomcat+xml atomcat 5 + application/atomsvc+xml atomsvc 6 + application/ccxml+xml ccxml 7 + application/cdmi-capability cdmia 8 + application/cdmi-container cdmic 9 + application/cdmi-domain cdmid 10 + application/cdmi-object cdmio 11 + application/cdmi-queue cdmiq 12 + application/cu-seeme cu 13 + application/davmount+xml davmount 14 + application/docbook+xml dbk 15 + application/dssc+der dssc 16 + application/dssc+xml xdssc 17 + application/ecmascript ecma 18 + application/emma+xml emma 19 + application/epub+zip epub 20 + application/exi exi 21 + application/font-tdpfr pfr 22 + application/gml+xml gml 23 + application/gpx+xml gpx 24 + application/gxf gxf 25 + application/hyperstudio stk 26 + application/inkml+xml ink inkml 27 + application/ipfix ipfix 28 + application/java-archive jar 29 + application/java-serialized-object ser 30 + application/java-vm class 31 + application/javascript js mjs 32 + application/json json 33 + application/jsonml+json jsonml 34 + application/lost+xml lostxml 35 + application/mac-binhex40 hqx 36 + application/mac-compactpro cpt 37 + application/mads+xml mads 38 + application/marc mrc 39 + application/marcxml+xml mrcx 40 + application/mathematica ma nb mb 41 + application/mathml+xml mathml 42 + application/mbox mbox 43 + application/mediaservercontrol+xml mscml 44 + application/metalink+xml metalink 45 + application/metalink4+xml meta4 46 + application/mets+xml mets 47 + application/mods+xml mods 48 + application/mp21 m21 mp21 49 + application/mp4 mp4s 50 + application/msword doc dot 51 + application/mxf mxf 52 + application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy 53 + application/oda oda 54 + application/oebps-package+xml opf 55 + application/ogg ogx 56 + application/omdoc+xml omdoc 57 + application/onenote onetoc onetoc2 onetmp onepkg 58 + application/oxps oxps 59 + application/patch-ops-error+xml xer 60 + application/pdf pdf 61 + application/pgp-encrypted pgp 62 + application/pgp-signature asc sig 63 + application/pics-rules prf 64 + application/pkcs10 p10 65 + application/pkcs7-mime p7m p7c 66 + application/pkcs7-signature p7s 67 + application/pkcs8 p8 68 + application/pkix-attr-cert ac 69 + application/pkix-cert cer 70 + application/pkix-crl crl 71 + application/pkix-pkipath pkipath 72 + application/pkixcmp pki 73 + application/pls+xml pls 74 + application/postscript ai eps ps 75 + application/prs.cww cww 76 + application/pskc+xml pskcxml 77 + application/rdf+xml rdf 78 + application/reginfo+xml rif 79 + application/relax-ng-compact-syntax rnc 80 + application/resource-lists+xml rl 81 + application/resource-lists-diff+xml rld 82 + application/rls-services+xml rs 83 + application/rpki-ghostbusters gbr 84 + application/rpki-manifest mft 85 + application/rpki-roa roa 86 + application/rsd+xml rsd 87 + application/rss+xml rss 88 + application/rtf rtf 89 + application/sbml+xml sbml 90 + application/scvp-cv-request scq 91 + application/scvp-cv-response scs 92 + application/scvp-vp-request spq 93 + application/scvp-vp-response spp 94 + application/sdp sdp 95 + application/set-payment-initiation setpay 96 + application/set-registration-initiation setreg 97 + application/shf+xml shf 98 + application/smil+xml smi smil 99 + application/sparql-query rq 100 + application/sparql-results+xml srx 101 + application/srgs gram 102 + application/srgs+xml grxml 103 + application/sru+xml sru 104 + application/ssdl+xml ssdl 105 + application/ssml+xml ssml 106 + application/tei+xml tei teicorpus 107 + application/thraud+xml tfi 108 + application/timestamped-data tsd 109 + application/vnd.3gpp.pic-bw-large plb 110 + application/vnd.3gpp.pic-bw-small psb 111 + application/vnd.3gpp.pic-bw-var pvb 112 + application/vnd.3gpp2.tcap tcap 113 + application/vnd.3m.post-it-notes pwn 114 + application/vnd.accpac.simply.aso aso 115 + application/vnd.accpac.simply.imp imp 116 + application/vnd.acucobol acu 117 + application/vnd.acucorp atc acutc 118 + application/vnd.adobe.air-application-installer-package+zip air 119 + application/vnd.adobe.formscentral.fcdt fcdt 120 + application/vnd.adobe.fxp fxp fxpl 121 + application/vnd.adobe.xdp+xml xdp 122 + application/vnd.adobe.xfdf xfdf 123 + application/vnd.ahead.space ahead 124 + application/vnd.airzip.filesecure.azf azf 125 + application/vnd.airzip.filesecure.azs azs 126 + application/vnd.amazon.ebook azw 127 + application/vnd.americandynamics.acc acc 128 + application/vnd.amiga.ami ami 129 + application/vnd.android.package-archive apk 130 + application/vnd.anser-web-certificate-issue-initiation cii 131 + application/vnd.anser-web-funds-transfer-initiation fti 132 + application/vnd.antix.game-component atx 133 + application/vnd.apple.installer+xml mpkg 134 + application/vnd.apple.mpegurl m3u8 135 + application/vnd.aristanetworks.swi swi 136 + application/vnd.astraea-software.iota iota 137 + application/vnd.audiograph aep 138 + application/vnd.blueice.multipass mpm 139 + application/vnd.bmi bmi 140 + application/vnd.businessobjects rep 141 + application/vnd.chemdraw+xml cdxml 142 + application/vnd.chipnuts.karaoke-mmd mmd 143 + application/vnd.cinderella cdy 144 + application/vnd.claymore cla 145 + application/vnd.cloanto.rp9 rp9 146 + application/vnd.clonk.c4group c4g c4d c4f c4p c4u 147 + application/vnd.cluetrust.cartomobile-config c11amc 148 + application/vnd.cluetrust.cartomobile-config-pkg c11amz 149 + application/vnd.commonspace csp 150 + application/vnd.contact.cmsg cdbcmsg 151 + application/vnd.cosmocaller cmc 152 + application/vnd.crick.clicker clkx 153 + application/vnd.crick.clicker.keyboard clkk 154 + application/vnd.crick.clicker.palette clkp 155 + application/vnd.crick.clicker.template clkt 156 + application/vnd.crick.clicker.wordbank clkw 157 + application/vnd.criticaltools.wbs+xml wbs 158 + application/vnd.ctc-posml pml 159 + application/vnd.cups-ppd ppd 160 + application/vnd.curl.car car 161 + application/vnd.curl.pcurl pcurl 162 + application/vnd.dart dart 163 + application/vnd.data-vision.rdz rdz 164 + application/vnd.dece.data uvf uvvf uvd uvvd 165 + application/vnd.dece.ttml+xml uvt uvvt 166 + application/vnd.dece.unspecified uvx uvvx 167 + application/vnd.dece.zip uvz uvvz 168 + application/vnd.denovo.fcselayout-link fe_launch 169 + application/vnd.dna dna 170 + application/vnd.dolby.mlp mlp 171 + application/vnd.dpgraph dpg 172 + application/vnd.dreamfactory dfac 173 + application/vnd.ds-keypoint kpxx 174 + application/vnd.dvb.ait ait 175 + application/vnd.dvb.service svc 176 + application/vnd.dynageo geo 177 + application/vnd.ecowin.chart mag 178 + application/vnd.enliven nml 179 + application/vnd.epson.esf esf 180 + application/vnd.epson.msf msf 181 + application/vnd.epson.quickanime qam 182 + application/vnd.epson.salt slt 183 + application/vnd.epson.ssf ssf 184 + application/vnd.eszigno3+xml es3 et3 185 + application/vnd.ezpix-album ez2 186 + application/vnd.ezpix-package ez3 187 + application/vnd.fdf fdf 188 + application/vnd.fdsn.mseed mseed 189 + application/vnd.fdsn.seed seed dataless 190 + application/vnd.flographit gph 191 + application/vnd.fluxtime.clip ftc 192 + application/vnd.framemaker fm frame maker book 193 + application/vnd.frogans.fnc fnc 194 + application/vnd.frogans.ltf ltf 195 + application/vnd.fsc.weblaunch fsc 196 + application/vnd.fujitsu.oasys oas 197 + application/vnd.fujitsu.oasys2 oa2 198 + application/vnd.fujitsu.oasys3 oa3 199 + application/vnd.fujitsu.oasysgp fg5 200 + application/vnd.fujitsu.oasysprs bh2 201 + application/vnd.fujixerox.ddd ddd 202 + application/vnd.fujixerox.docuworks xdw 203 + application/vnd.fujixerox.docuworks.binder xbd 204 + application/vnd.fuzzysheet fzs 205 + application/vnd.genomatix.tuxedo txd 206 + application/vnd.geogebra.file ggb 207 + application/vnd.geogebra.tool ggt 208 + application/vnd.geometry-explorer gex gre 209 + application/vnd.geonext gxt 210 + application/vnd.geoplan g2w 211 + application/vnd.geospace g3w 212 + application/vnd.gmx gmx 213 + application/vnd.google-earth.kml+xml kml 214 + application/vnd.google-earth.kmz kmz 215 + application/vnd.grafeq gqf gqs 216 + application/vnd.groove-account gac 217 + application/vnd.groove-help ghf 218 + application/vnd.groove-identity-message gim 219 + application/vnd.groove-injector grv 220 + application/vnd.groove-tool-message gtm 221 + application/vnd.groove-tool-template tpl 222 + application/vnd.groove-vcard vcg 223 + application/vnd.hal+xml hal 224 + application/vnd.handheld-entertainment+xml zmm 225 + application/vnd.hbci hbci 226 + application/vnd.hhe.lesson-player les 227 + application/vnd.hp-hpgl hpgl 228 + application/vnd.hp-hpid hpid 229 + application/vnd.hp-hps hps 230 + application/vnd.hp-jlyt jlt 231 + application/vnd.hp-pcl pcl 232 + application/vnd.hp-pclxl pclxl 233 + application/vnd.hydrostatix.sof-data sfd-hdstx 234 + application/vnd.ibm.minipay mpy 235 + application/vnd.ibm.modcap afp listafp list3820 236 + application/vnd.ibm.rights-management irm 237 + application/vnd.ibm.secure-container sc 238 + application/vnd.iccprofile icc icm 239 + application/vnd.igloader igl 240 + application/vnd.immervision-ivp ivp 241 + application/vnd.immervision-ivu ivu 242 + application/vnd.insors.igm igm 243 + application/vnd.intercon.formnet xpw xpx 244 + application/vnd.intergeo i2g 245 + application/vnd.intu.qbo qbo 246 + application/vnd.intu.qfx qfx 247 + application/vnd.ipunplugged.rcprofile rcprofile 248 + application/vnd.irepository.package+xml irp 249 + application/vnd.is-xpr xpr 250 + application/vnd.isac.fcs fcs 251 + application/vnd.jam jam 252 + application/vnd.jcp.javame.midlet-rms rms 253 + application/vnd.jisp jisp 254 + application/vnd.joost.joda-archive joda 255 + application/vnd.kahootz ktz ktr 256 + application/vnd.kde.karbon karbon 257 + application/vnd.kde.kchart chrt 258 + application/vnd.kde.kformula kfo 259 + application/vnd.kde.kivio flw 260 + application/vnd.kde.kontour kon 261 + application/vnd.kde.kpresenter kpr kpt 262 + application/vnd.kde.kspread ksp 263 + application/vnd.kde.kword kwd kwt 264 + application/vnd.kenameaapp htke 265 + application/vnd.kidspiration kia 266 + application/vnd.kinar kne knp 267 + application/vnd.koan skp skd skt skm 268 + application/vnd.kodak-descriptor sse 269 + application/vnd.las.las+xml lasxml 270 + application/vnd.llamagraphics.life-balance.desktop lbd 271 + application/vnd.llamagraphics.life-balance.exchange+xml lbe 272 + application/vnd.lotus-1-2-3 123 273 + application/vnd.lotus-approach apr 274 + application/vnd.lotus-freelance pre 275 + application/vnd.lotus-notes nsf 276 + application/vnd.lotus-organizer org 277 + application/vnd.lotus-screencam scm 278 + application/vnd.lotus-wordpro lwp 279 + application/vnd.macports.portpkg portpkg 280 + application/vnd.mcd mcd 281 + application/vnd.medcalcdata mc1 282 + application/vnd.mediastation.cdkey cdkey 283 + application/vnd.mfer mwf 284 + application/vnd.mfmp mfm 285 + application/vnd.micrografx.flo flo 286 + application/vnd.micrografx.igx igx 287 + application/vnd.mif mif 288 + application/vnd.mobius.daf daf 289 + application/vnd.mobius.dis dis 290 + application/vnd.mobius.mbk mbk 291 + application/vnd.mobius.mqy mqy 292 + application/vnd.mobius.msl msl 293 + application/vnd.mobius.plc plc 294 + application/vnd.mobius.txf txf 295 + application/vnd.mophun.application mpn 296 + application/vnd.mophun.certificate mpc 297 + application/vnd.mozilla.xul+xml xul 298 + application/vnd.ms-artgalry cil 299 + application/vnd.ms-cab-compressed cab 300 + application/vnd.ms-excel xls xlm xla xlc xlt xlw 301 + application/vnd.ms-excel.addin.macroenabled.12 xlam 302 + application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb 303 + application/vnd.ms-excel.sheet.macroenabled.12 xlsm 304 + application/vnd.ms-excel.template.macroenabled.12 xltm 305 + application/vnd.ms-fontobject eot 306 + application/vnd.ms-htmlhelp chm 307 + application/vnd.ms-ims ims 308 + application/vnd.ms-lrm lrm 309 + application/vnd.ms-officetheme thmx 310 + application/vnd.ms-pki.seccat cat 311 + application/vnd.ms-pki.stl stl 312 + application/vnd.ms-powerpoint ppt pps pot 313 + application/vnd.ms-powerpoint.addin.macroenabled.12 ppam 314 + application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm 315 + application/vnd.ms-powerpoint.slide.macroenabled.12 sldm 316 + application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm 317 + application/vnd.ms-powerpoint.template.macroenabled.12 potm 318 + application/vnd.ms-project mpp mpt 319 + application/vnd.ms-word.document.macroenabled.12 docm 320 + application/vnd.ms-word.template.macroenabled.12 dotm 321 + application/vnd.ms-works wps wks wcm wdb 322 + application/vnd.ms-wpl wpl 323 + application/vnd.ms-xpsdocument xps 324 + application/vnd.mseq mseq 325 + application/vnd.musician mus 326 + application/vnd.muvee.style msty 327 + application/vnd.mynfc taglet 328 + application/vnd.neurolanguage.nlu nlu 329 + application/vnd.nitf ntf nitf 330 + application/vnd.noblenet-directory nnd 331 + application/vnd.noblenet-sealer nns 332 + application/vnd.noblenet-web nnw 333 + application/vnd.nokia.n-gage.data ngdat 334 + application/vnd.nokia.n-gage.symbian.install n-gage 335 + application/vnd.nokia.radio-preset rpst 336 + application/vnd.nokia.radio-presets rpss 337 + application/vnd.novadigm.edm edm 338 + application/vnd.novadigm.edx edx 339 + application/vnd.novadigm.ext ext 340 + application/vnd.oasis.opendocument.chart odc 341 + application/vnd.oasis.opendocument.chart-template otc 342 + application/vnd.oasis.opendocument.database odb 343 + application/vnd.oasis.opendocument.formula odf 344 + application/vnd.oasis.opendocument.formula-template odft 345 + application/vnd.oasis.opendocument.graphics odg 346 + application/vnd.oasis.opendocument.graphics-template otg 347 + application/vnd.oasis.opendocument.image odi 348 + application/vnd.oasis.opendocument.image-template oti 349 + application/vnd.oasis.opendocument.presentation odp 350 + application/vnd.oasis.opendocument.presentation-template otp 351 + application/vnd.oasis.opendocument.spreadsheet ods 352 + application/vnd.oasis.opendocument.spreadsheet-template ots 353 + application/vnd.oasis.opendocument.text odt 354 + application/vnd.oasis.opendocument.text-master odm 355 + application/vnd.oasis.opendocument.text-template ott 356 + application/vnd.oasis.opendocument.text-web oth 357 + application/vnd.olpc-sugar xo 358 + application/vnd.oma.dd2+xml dd2 359 + application/vnd.openofficeorg.extension oxt 360 + application/vnd.openxmlformats-officedocument.presentationml.presentation pptx 361 + application/vnd.openxmlformats-officedocument.presentationml.slide sldx 362 + application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx 363 + application/vnd.openxmlformats-officedocument.presentationml.template potx 364 + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx 365 + application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx 366 + application/vnd.openxmlformats-officedocument.wordprocessingml.document docx 367 + application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx 368 + application/vnd.osgeo.mapguide.package mgp 369 + application/vnd.osgi.dp dp 370 + application/vnd.osgi.subsystem esa 371 + application/vnd.palm pdb pqa oprc 372 + application/vnd.pawaafile paw 373 + application/vnd.pg.format str 374 + application/vnd.pg.osasli ei6 375 + application/vnd.picsel efif 376 + application/vnd.pmi.widget wg 377 + application/vnd.pocketlearn plf 378 + application/vnd.powerbuilder6 pbd 379 + application/vnd.previewsystems.box box 380 + application/vnd.proteus.magazine mgz 381 + application/vnd.publishare-delta-tree qps 382 + application/vnd.pvi.ptid1 ptid 383 + application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb 384 + application/vnd.realvnc.bed bed 385 + application/vnd.recordare.musicxml mxl 386 + application/vnd.recordare.musicxml+xml musicxml 387 + application/vnd.rig.cryptonote cryptonote 388 + application/vnd.rim.cod cod 389 + application/vnd.rn-realmedia rm 390 + application/vnd.rn-realmedia-vbr rmvb 391 + application/vnd.route66.link66+xml link66 392 + application/vnd.sailingtracker.track st 393 + application/vnd.seemail see 394 + application/vnd.sema sema 395 + application/vnd.semd semd 396 + application/vnd.semf semf 397 + application/vnd.shana.informed.formdata ifm 398 + application/vnd.shana.informed.formtemplate itp 399 + application/vnd.shana.informed.interchange iif 400 + application/vnd.shana.informed.package ipk 401 + application/vnd.simtech-mindmapper twd twds 402 + application/vnd.smaf mmf 403 + application/vnd.smart.teacher teacher 404 + application/vnd.solent.sdkm+xml sdkm sdkd 405 + application/vnd.spotfire.dxp dxp 406 + application/vnd.spotfire.sfs sfs 407 + application/vnd.stardivision.calc sdc 408 + application/vnd.stardivision.draw sda 409 + application/vnd.stardivision.impress sdd 410 + application/vnd.stardivision.math smf 411 + application/vnd.stardivision.writer sdw vor 412 + application/vnd.stardivision.writer-global sgl 413 + application/vnd.stepmania.package smzip 414 + application/vnd.stepmania.stepchart sm 415 + application/vnd.sun.xml.calc sxc 416 + application/vnd.sun.xml.calc.template stc 417 + application/vnd.sun.xml.draw sxd 418 + application/vnd.sun.xml.draw.template std 419 + application/vnd.sun.xml.impress sxi 420 + application/vnd.sun.xml.impress.template sti 421 + application/vnd.sun.xml.math sxm 422 + application/vnd.sun.xml.writer sxw 423 + application/vnd.sun.xml.writer.global sxg 424 + application/vnd.sun.xml.writer.template stw 425 + application/vnd.sus-calendar sus susp 426 + application/vnd.svd svd 427 + application/vnd.symbian.install sis sisx 428 + application/vnd.syncml+xml xsm 429 + application/vnd.syncml.dm+wbxml bdm 430 + application/vnd.syncml.dm+xml xdm 431 + application/vnd.tao.intent-module-archive tao 432 + application/vnd.tcpdump.pcap pcap cap dmp 433 + application/vnd.tmobile-livetv tmo 434 + application/vnd.trid.tpt tpt 435 + application/vnd.triscape.mxs mxs 436 + application/vnd.trueapp tra 437 + application/vnd.ufdl ufd ufdl 438 + application/vnd.uiq.theme utz 439 + application/vnd.umajin umj 440 + application/vnd.unity unityweb 441 + application/vnd.uoml+xml uoml 442 + application/vnd.vcx vcx 443 + application/vnd.visio vsd vst vss vsw 444 + application/vnd.visionary vis 445 + application/vnd.vsf vsf 446 + application/vnd.wap.wbxml wbxml 447 + application/vnd.wap.wmlc wmlc 448 + application/vnd.wap.wmlscriptc wmlsc 449 + application/vnd.webturbo wtb 450 + application/vnd.wolfram.player nbp 451 + application/vnd.wordperfect wpd 452 + application/vnd.wqd wqd 453 + application/vnd.wt.stf stf 454 + application/vnd.xara xar 455 + application/vnd.xfdl xfdl 456 + application/vnd.yamaha.hv-dic hvd 457 + application/vnd.yamaha.hv-script hvs 458 + application/vnd.yamaha.hv-voice hvp 459 + application/vnd.yamaha.openscoreformat osf 460 + application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg 461 + application/vnd.yamaha.smaf-audio saf 462 + application/vnd.yamaha.smaf-phrase spf 463 + application/vnd.yellowriver-custom-menu cmp 464 + application/vnd.zul zir zirz 465 + application/vnd.zzazz.deck+xml zaz 466 + application/voicexml+xml vxml 467 + application/wasm wasm 468 + application/widget wgt 469 + application/winhlp hlp 470 + application/wsdl+xml wsdl 471 + application/wspolicy+xml wspolicy 472 + application/x-7z-compressed 7z 473 + application/x-abiword abw 474 + application/x-ace-compressed ace 475 + application/x-apple-diskimage dmg 476 + application/x-authorware-bin aab x32 u32 vox 477 + application/x-authorware-map aam 478 + application/x-authorware-seg aas 479 + application/x-bcpio bcpio 480 + application/x-bittorrent torrent 481 + application/x-blorb blb blorb 482 + application/x-bzip bz 483 + application/x-bzip2 bz2 boz 484 + application/x-cbr cbr cba cbt cbz cb7 485 + application/x-cdlink vcd 486 + application/x-cfs-compressed cfs 487 + application/x-chat chat 488 + application/x-chess-pgn pgn 489 + application/x-conference nsc 490 + application/x-cpio cpio 491 + application/x-csh csh 492 + application/x-debian-package deb udeb 493 + application/x-dgc-compressed dgc 494 + application/x-director dir dcr dxr cst cct cxt w3d fgd swa 495 + application/x-doom wad 496 + application/x-dtbncx+xml ncx 497 + application/x-dtbook+xml dtb 498 + application/x-dtbresource+xml res 499 + application/x-dvi dvi 500 + application/x-envoy evy 501 + application/x-eva eva 502 + application/x-font-bdf bdf 503 + application/x-font-ghostscript gsf 504 + application/x-font-linux-psf psf 505 + application/x-font-pcf pcf 506 + application/x-font-snf snf 507 + application/x-font-type1 pfa pfb pfm afm 508 + application/x-freearc arc 509 + application/x-futuresplash spl 510 + application/x-gca-compressed gca 511 + application/x-glulx ulx 512 + application/x-gnumeric gnumeric 513 + application/x-gramps-xml gramps 514 + application/x-gtar gtar 515 + application/x-hdf hdf 516 + application/x-install-instructions install 517 + application/x-iso9660-image iso 518 + application/x-java-jnlp-file jnlp 519 + application/x-latex latex 520 + application/x-lzh-compressed lzh lha 521 + application/x-mie mie 522 + application/x-mobipocket-ebook prc mobi 523 + application/x-ms-application application 524 + application/x-ms-shortcut lnk 525 + application/x-ms-wmd wmd 526 + application/x-ms-wmz wmz 527 + application/x-ms-xbap xbap 528 + application/x-msaccess mdb 529 + application/x-msbinder obd 530 + application/x-mscardfile crd 531 + application/x-msclip clp 532 + application/x-msdownload exe dll com bat msi 533 + application/x-msmediaview mvb m13 m14 534 + application/x-msmetafile wmf wmz emf emz 535 + application/x-msmoney mny 536 + application/x-mspublisher pub 537 + application/x-msschedule scd 538 + application/x-msterminal trm 539 + application/x-mswrite wri 540 + application/x-netcdf nc cdf 541 + application/x-nzb nzb 542 + application/x-pkcs12 p12 pfx 543 + application/x-pkcs7-certificates p7b spc 544 + application/x-pkcs7-certreqresp p7r 545 + application/x-rar-compressed rar 546 + application/x-research-info-systems ris 547 + application/x-sh sh 548 + application/x-shar shar 549 + application/x-shockwave-flash swf 550 + application/x-silverlight-app xap 551 + application/x-sql sql 552 + application/x-stuffit sit 553 + application/x-stuffitx sitx 554 + application/x-subrip srt 555 + application/x-sv4cpio sv4cpio 556 + application/x-sv4crc sv4crc 557 + application/x-t3vm-image t3 558 + application/x-tads gam 559 + application/x-tar tar 560 + application/x-tcl tcl 561 + application/x-tex tex 562 + application/x-tex-tfm tfm 563 + application/x-texinfo texinfo texi 564 + application/x-tgif obj 565 + application/x-ustar ustar 566 + application/x-wais-source src 567 + application/x-x509-ca-cert der crt 568 + application/x-xfig fig 569 + application/x-xliff+xml xlf 570 + application/x-xpinstall xpi 571 + application/x-xz xz 572 + application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 573 + application/xaml+xml xaml 574 + application/xcap-diff+xml xdf 575 + application/xenc+xml xenc 576 + application/xhtml+xml xhtml xht 577 + application/xml xml xsl 578 + application/xml-dtd dtd 579 + application/xop+xml xop 580 + application/xproc+xml xpl 581 + application/xslt+xml xslt 582 + application/xspf+xml xspf 583 + application/xv+xml mxml xhvml xvml xvm 584 + application/yang yang 585 + application/yin+xml yin 586 + application/zip zip 587 + audio/adpcm adp 588 + audio/basic au snd 589 + audio/midi mid midi kar rmi 590 + audio/mp4 m4a mp4a 591 + audio/mpeg mpga mp2 mp2a mp3 m2a m3a 592 + audio/ogg oga ogg spx opus 593 + audio/s3m s3m 594 + audio/silk sil 595 + audio/vnd.dece.audio uva uvva 596 + audio/vnd.digital-winds eol 597 + audio/vnd.dra dra 598 + audio/vnd.dts dts 599 + audio/vnd.dts.hd dtshd 600 + audio/vnd.lucent.voice lvp 601 + audio/vnd.ms-playready.media.pya pya 602 + audio/vnd.nuera.ecelp4800 ecelp4800 603 + audio/vnd.nuera.ecelp7470 ecelp7470 604 + audio/vnd.nuera.ecelp9600 ecelp9600 605 + audio/vnd.rip rip 606 + audio/webm weba 607 + audio/x-aac aac 608 + audio/x-aiff aif aiff aifc 609 + audio/x-caf caf 610 + audio/x-flac flac 611 + audio/x-matroska mka 612 + audio/x-mpegurl m3u 613 + audio/x-ms-wax wax 614 + audio/x-ms-wma wma 615 + audio/x-pn-realaudio ram ra 616 + audio/x-pn-realaudio-plugin rmp 617 + audio/x-wav wav 618 + audio/xm xm 619 + chemical/x-cdx cdx 620 + chemical/x-cif cif 621 + chemical/x-cmdf cmdf 622 + chemical/x-cml cml 623 + chemical/x-csml csml 624 + chemical/x-xyz xyz 625 + font/collection ttc 626 + font/otf otf 627 + font/ttf ttf 628 + font/woff woff 629 + font/woff2 woff2 630 + image/bmp bmp 631 + image/cgm cgm 632 + image/g3fax g3 633 + image/gif gif 634 + image/ief ief 635 + image/jpeg jpeg jpg jpe 636 + image/ktx ktx 637 + image/png png 638 + image/prs.btif btif 639 + image/sgi sgi 640 + image/svg+xml svg svgz 641 + image/tiff tiff tif 642 + image/vnd.adobe.photoshop psd 643 + image/vnd.dece.graphic uvi uvvi uvg uvvg 644 + image/vnd.djvu djvu djv 645 + image/vnd.dvb.subtitle sub 646 + image/vnd.dwg dwg 647 + image/vnd.dxf dxf 648 + image/vnd.fastbidsheet fbs 649 + image/vnd.fpx fpx 650 + image/vnd.fst fst 651 + image/vnd.fujixerox.edmics-mmr mmr 652 + image/vnd.fujixerox.edmics-rlc rlc 653 + image/vnd.ms-modi mdi 654 + image/vnd.ms-photo wdp 655 + image/vnd.net-fpx npx 656 + image/vnd.wap.wbmp wbmp 657 + image/vnd.xiff xif 658 + image/webp webp 659 + image/x-3ds 3ds 660 + image/x-cmu-raster ras 661 + image/x-cmx cmx 662 + image/x-freehand fh fhc fh4 fh5 fh7 663 + image/x-icon ico 664 + image/x-mrsid-image sid 665 + image/x-pcx pcx 666 + image/x-pict pic pct 667 + image/x-portable-anymap pnm 668 + image/x-portable-bitmap pbm 669 + image/x-portable-graymap pgm 670 + image/x-portable-pixmap ppm 671 + image/x-rgb rgb 672 + image/x-tga tga 673 + image/x-xbitmap xbm 674 + image/x-xpixmap xpm 675 + image/x-xwindowdump xwd 676 + message/rfc822 eml mime 677 + model/iges igs iges 678 + model/mesh msh mesh silo 679 + model/vnd.collada+xml dae 680 + model/vnd.dwf dwf 681 + model/vnd.gdl gdl 682 + model/vnd.gtw gtw 683 + model/vnd.mts mts 684 + model/vnd.vtu vtu 685 + model/vrml wrl vrml 686 + model/x3d+binary x3db x3dbz 687 + model/x3d+vrml x3dv x3dvz 688 + model/x3d+xml x3d x3dz 689 + text/cache-manifest appcache 690 + text/calendar ics ifb 691 + text/css css 692 + text/csv csv 693 + text/html html htm 694 + text/n3 n3 695 + text/plain txt text conf def list log in 696 + text/prs.lines.tag dsc 697 + text/richtext rtx 698 + text/sgml sgml sgm 699 + text/tab-separated-values tsv 700 + text/troff t tr roff man me ms 701 + text/turtle ttl 702 + text/uri-list uri uris urls 703 + text/vcard vcard 704 + text/vnd.curl curl 705 + text/vnd.curl.dcurl dcurl 706 + text/vnd.curl.mcurl mcurl 707 + text/vnd.curl.scurl scurl 708 + text/vnd.dvb.subtitle sub 709 + text/vnd.fly fly 710 + text/vnd.fmi.flexstor flx 711 + text/vnd.graphviz gv 712 + text/vnd.in3d.3dml 3dml 713 + text/vnd.in3d.spot spot 714 + text/vnd.sun.j2me.app-descriptor jad 715 + text/vnd.wap.wml wml 716 + text/vnd.wap.wmlscript wmls 717 + text/x-asm s asm 718 + text/x-c c cc cxx cpp h hh dic 719 + text/x-fortran f for f77 f90 720 + text/x-java-source java 721 + text/x-nfo nfo 722 + text/x-opml opml 723 + text/x-pascal p pas 724 + text/x-setext etx 725 + text/x-sfv sfv 726 + text/x-uuencode uu 727 + text/x-vcalendar vcs 728 + text/x-vcard vcf 729 + video/3gpp 3gp 730 + video/3gpp2 3g2 731 + video/h261 h261 732 + video/h263 h263 733 + video/h264 h264 734 + video/jpeg jpgv 735 + video/jpm jpm jpgm 736 + video/mj2 mj2 mjp2 737 + video/mp4 mp4 mp4v mpg4 738 + video/mpeg mpeg mpg mpe m1v m2v 739 + video/ogg ogv 740 + video/quicktime qt mov 741 + video/vnd.dece.hd uvh uvvh 742 + video/vnd.dece.mobile uvm uvvm 743 + video/vnd.dece.pd uvp uvvp 744 + video/vnd.dece.sd uvs uvvs 745 + video/vnd.dece.video uvv uvvv 746 + video/vnd.dvb.file dvb 747 + video/vnd.fvt fvt 748 + video/vnd.mpegurl mxu m4u 749 + video/vnd.ms-playready.media.pyv pyv 750 + video/vnd.uvvu.mp4 uvu uvvu 751 + video/vnd.vivo viv 752 + video/webm webm 753 + video/x-f4v f4v 754 + video/x-fli fli 755 + video/x-flv flv 756 + video/x-m4v m4v 757 + video/x-matroska mkv mk3d mks 758 + video/x-mng mng 759 + video/x-ms-asf asf asx 760 + video/x-ms-vob vob 761 + video/x-ms-wm wm 762 + video/x-ms-wmv wmv 763 + video/x-ms-wmx wmx 764 + video/x-ms-wvx wvx 765 + video/x-msvideo avi 766 + video/x-sgi-movie movie 767 + video/x-smv smv 768 + x-conference/x-cooltalk ice
+12
vendor/opam/magic-mime/src/dune
··· 1 + (library 2 + (name magic_mime_library) 3 + (public_name magic-mime) 4 + (wrapped false)) 5 + 6 + (rule 7 + (targets mime_types.ml) 8 + (deps ../mime.types ../x-mime.types ../files.types) 9 + (action (with-stdout-to %{targets} 10 + (progn (run ../generator/generate_mime_types.exe ../mime.types ../x-mime.types) 11 + (run ../generator/generate_mime_types.exe ../files.types --files) 12 + (run ../generator/generate_mime_types.exe ../mime.types ../x-mime.types --mime)))))
+43
vendor/opam/magic-mime/src/magic_mime.ml
··· 1 + (* 2 + * Copyright (c) 2009 Anil Madhavapeddy <anil@recoil.org> 3 + * 4 + * Permission to use, copy, modify, and distribute this software for any 5 + * purpose with or without fee is hereby granted, provided that the above 6 + * copyright notice and this permission notice appear in all copies. 7 + * 8 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 + *) 16 + 17 + (* Retrieve file extension, if any, or blank string otherwise *) 18 + let get_extension filename = 19 + let rec search_dot i = 20 + if i < 1 || filename.[i] = '/' then "" 21 + else if filename.[i] = '.' then 22 + String.sub filename (i+1) (String.length filename - i - 1) 23 + else search_dot (i - 1) in 24 + search_dot (String.length filename - 1) 25 + 26 + (* Given a full filename, lookup its MIME type *) 27 + let lookup ?default filename = 28 + match get_extension filename with 29 + | "" -> Mime_types.map_file ?default filename 30 + | ext -> Mime_types.map_extension ?default (String.lowercase_ascii ext) 31 + 32 + let reverse_lookup mime = 33 + let mime' = 34 + let string_length = String.length mime in 35 + let rec strip_parameters i = 36 + if i = string_length || mime.[i] = ';' then 37 + String.sub mime 0 i 38 + else 39 + strip_parameters (i + 1) 40 + in 41 + strip_parameters 0 42 + in 43 + Mime_types.map_mime mime'
+31
vendor/opam/magic-mime/src/magic_mime.mli
··· 1 + (* 2 + * Copyright (c) 2009-2015 Anil Madhavapeddy <anil@recoil.org> 3 + * 4 + * Permission to use, copy, modify, and distribute this software for any 5 + * purpose with or without fee is hereby granted, provided that the above 6 + * copyright notice and this permission notice appear in all copies. 7 + * 8 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 + *) 16 + 17 + (** Convert file extensions to MIME types *) 18 + 19 + val lookup : ?default:string -> string -> string 20 + (** [lookup ~default filename] will return a MIME type for the full [filename] 21 + supplied by examining its extension and look it up by using 22 + {!Mime_types.map_extension} or {!Mime_types.map_file} if there 23 + is no file extension present. *) 24 + 25 + (** Convert MIME types to file extensions *) 26 + 27 + val reverse_lookup : string -> string list 28 + (** [reverse_lookup mime] will return a list of file extensions for the 29 + MIME type supplied by stripping any parameters and looking it up by 30 + using {!Mime_types.map_mime}. 31 + If an unknown MIME type is supplied, empty list is returned. *)
+31
vendor/opam/magic-mime/src/mime_types.mli
··· 1 + (* 2 + * Copyright (c) 2015 Anil Madhavapeddy <anil@recoil.org> 3 + * 4 + * Permission to use, copy, modify, and distribute this software for any 5 + * purpose with or without fee is hereby granted, provided that the above 6 + * copyright notice and this permission notice appear in all copies. 7 + * 8 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 + *) 16 + 17 + (** Database of file extensions to MIME types from RFC2045 onwards. *) 18 + 19 + (** [map_extension ~default e] converts the file extension [e] into a MIME type, 20 + defaulting to [default] (which is [application/octet-stream] by default) if 21 + it is unknown. *) 22 + val map_extension : ?default:string -> string -> string 23 + 24 + (** [map_file ~default f] converts the filename [f] into a MIME type, 25 + defaulting to [default] (which is [application/octet-stream] by default) if 26 + it is unknown. *) 27 + val map_file : ?default:string -> string -> string 28 + 29 + (** [map_mime m] converts the MIME type [m] into a list of acceptable 30 + file extensions, defaulting to an empty list if it is unknown. *) 31 + val map_mime : string -> string list
+49
vendor/opam/magic-mime/x-mime.types
··· 1 + # Additional extensions 2 + text/x-R r R Rhistory Rout Rout.save Rout.fail 3 + text/x-autoconf ac 4 + text/x-ada adb ads 5 + text/x-asp asp 6 + text/x-bibtex bib 7 + text/x-c c 8 + text/x-chdr h hh hp hpp h++ 9 + text/x-cpp cpp c++ cxxcc C 10 + text/x-csharp cs 11 + text/x-dsrc d 12 + text/x-diff diff path 13 + text/vnd.graphviz dot gv 14 + text/x-dtd dtd 15 + text/x-eiffel e eif 16 + text/x-erlang erl erh 17 + text/x-forth frt fs 18 + text/x-fortran f f90 f95 for 19 + text/x-fsharp fs 20 + text/x-gap g gd gi gap 21 + text/x-gtkrc gtkrc 22 + text/x-literate-haskell lhs 23 + text/x-haskell hs 24 + text/x-idl idl 25 + text/x-ini-file ini 26 + text/x-tex tex ltx sty cls dtx ins bbl 27 + text/x-libtool la lai lo 28 + text/x-lua lua 29 + text/x-makefile make mak mk 30 + text/x-markdown md mkd 31 + text/x-matlab m 32 + text/x-modelica mo mop 33 + text/x-nemerle n 34 + text/x-netrexx nrx 35 + text/x-objcsrc m 36 + text/x-objective-j j 37 + text/x-ocaml ml mli mll mly 38 + text/x-ocl ocl 39 + text/x-pascal p pas 40 + text/x-perl pl pm al perl t 41 + text/x-php php php3 php4 phtml 42 + text/x-gettext-translation po 43 + text/x-gettext-translation-template pot 44 + text/x-prolog prolog 45 + text/x-protobuf proto 46 + text/x-python py 47 + text/x-rpm-spec spec 48 + text/x-ruby rb rake 49 + text/x-scala scala