File::TypeDetermine file type using magic | |
Download |
File::Type Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Publisher Name:
- Paul Mison
- Publisher web site:
- http://search.cpan.org/~pmison/
File::Type Tags
File::Type Description
Determine file type using magic File::Type is a Perl module that uses magic numbers (typically at the start of a file) to determine the MIME type of that file.File::Type can use either a filename, or file contents, to determine the type of a file.SYNOPSIS my $ft = File::Type->new(); # read in data from file to $data, then my $type_from_data = $ft->checktype_contents($data); # alternatively, check file from disk my $type_from_file = $ft->checktype_filename($file); # convenient method for checking either a file or data my $type_1 = $ft->mime_type($file); my $type_2 = $ft->mime_type($data); Requirements: · Perl
File::Type Related Software