File: filetypes.man

package info (click to toggle)
tcllib 1.8-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 13,628 kB
  • ctags: 4,897
  • sloc: tcl: 88,012; sh: 7,856; ansic: 4,174; xml: 1,765; yacc: 753; perl: 84; f90: 84; makefile: 60; python: 33; ruby: 13; php: 11
file content (55 lines) | stat: -rw-r--r-- 1,310 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin fileutil::magic::file n 1.7]
[moddesc   {file utilities}]
[titledesc {Procedures implementing file-type recognition}]
[require Tcl 8.4]
[require fileutil::magic::file [opt 1.0]]
[description]
[para]

This package provides a command for the recognition of file types in
pure Tcl.

[para]

The core part of the recognizer was generated from a "magic(5)" file
containing the checks to perform to recognize files, and associated
file-types.

[para]

[emph Beware!] This recognizer is large, about 276 Kilobyte of
generated Tcl code.

[list_begin definitions]

[call [cmd ::fileutil::magic::file] [arg filename]]

This command is similar to the command [cmd fileutil::fileType].

[nl]

The output of the command for the specified file is a string
describing the type of the file.

[nl]

This list will be empty if the type of the file is not recognized.

[list_end]

[section REFERENCES]

[list_begin enum]
[enum]
[uri ftp://ftp.astron.com/pub/file/ {File(1) sources}]

This site contains the current sources for the file command, including
the magic definitions used by it. The latter were used by us to
generate this recognizer.

[list_end]

[see_also fileutil file(1) magic(5)]
[keywords type {file utilities} {file type} {file recognition}]
[manpage_end]