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
|
NAME
File::Type - determine file type using magic
INSTALLING
Install using the standard Module::Build method:
perl Build.PL
./Build
./Build test
sudo ./Build install
A Makefile.PL is also included if you do not have Module::Build:
perl Makefile.PL
make
make test
sudo make install
USAGE
my $ft = File::Type->new();
# read in data from file to $data, then
my $type_from_data = $ft->checktype_data($data);
# alternatively, check file from disk
my $type_from_file = $ft->checktype_filename($file);
For further information, perldoc File::Type after installation.
|