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::mime 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::mime 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 file(1), fileutil, magic(5)
46
48 file recognition, file type, file utilities, mime, type
49
50
51
52fumagic 1.0.2 fileutil::magic::mimetype(n)