1fileutil::magic::mimetype(n) file utilities fileutil::magic::mimetype(n)
2
3
4
5______________________________________________________________________________
6
8 fileutil::magic::mimetype - Procedures implementing mime-type recogni‐
9 tion
10
12 package require Tcl 8.4
13
14 package require fileutil::magic::mimetype ?1.0.2?
15
16 ::fileutil::magic::mimetype filename
17
18_________________________________________________________________
19
21 This package provides a command for the recognition of file types in
22 pure Tcl. The output is standardized to mime-types.
23
24 The core part of the recognizer was generated from a "magic(5)" file
25 containing the checks to perform to recognize files, and associated
26 mime-types.
27
28 ::fileutil::magic::mimetype filename
29 This command is similar to the command fileutil::fileType.
30
31 The output of the command for the specified file is not a list
32 of attributes describing the type of the file, but a list of
33 standard mime-types the file may have.
34
35 This list will be empty if the type of the file is not recog‐
36 nized.
37
39 [1] File(1) sources [ftp://ftp.astron.com/pub/file/] This site con‐
40 tains the current sources for the file command, including the
41 magic definitions used by it. The latter were used by us to gen‐
42 erate this recognizer.
43
45 This document, and the package it describes, will undoubtedly contain
46 bugs and other problems. Please report such in the category fileutil
47 :: magic of the Tcllib SF Trackers [http://source‐
48 forge.net/tracker/?group_id=12883]. Please also report any ideas for
49 enhancements you may have for either package and/or documentation.
50
52 file(1), fileutil, magic(5)
53
55 file recognition, file type, file utilities, mime, type
56
57
58
59fumagic 1.0.2 fileutil::magic::mimetype(n)