The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

File::Find::Rule::LibMagic - rule to match on file types or mime types

SYNOPSIS

use File::Find::Rule::LibMagic;

my @executables = find( file => magic => '*executable*', in => $searchdir );
my @images = find( file => mime => 'image/*', in => $homepagebase );

DESCRIPTION

File::Find::Rule::LibMagic extends File::Find::Rule by matching files depending on their magic file type or MIME type delivered through File::LibMagic from file(1) UNIX command.

Every UNIX user (or users of unix-like systems) knows the file(1) command. With this module files can be found depending on their file type from magic database or their MIME type.

It conflicts with File::Find::Rule::MMagic.

EXPORT

This module doesn't export any function. The provided functionality is called by File::Find::Rule according to the matching rules.

SUBROUTINES/METHODS

magic

Accepts a list of strings or regular expressions which are approved to match the result of File::LibMagic/checktype_filename.

mime

Accepts a list of strings or regular expressions which are approved to match the result of File::LibMagic/describe_filename.

AUTHOR

Jens Rehsack, <rehsack at cpan.org>

BUGS

Please report any bugs or feature requests to bug-file-find-rule-libmagic at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-LibMagic. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc File::Find::Rule::LibMagic

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2010 Jens Rehsack.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 48:

alternative text 'File::LibMagic/checktype_filename' contains non-escaped | or /

Around line 53:

alternative text 'File::LibMagic/describe_filename' contains non-escaped | or /