File::TypeCategories - Determine if files match a specific type
This documentation refers to File::TypeCategories version 0.08
use File::TypeCategories; # Brief but working code example(s) here showing the most common usage(s) # This section will be as far as many users bother reading, so make it as # educational and exemplary as possible.
A File::TypeCategories object can be used to test if files match the defined categories.
File::TypeCategories
new (%hash)
The types to ignore the default ignore includes:
ignore
build
backups
vcs
images
logs
editors
min
Match only files that match regexes in include
include
Don't match any files that match regexes in exclude
exclude
Match only files of types specified in include_type
include_type
Don't match files of types specified in exclude_type
exclude_type
Allow symlinks to match
The configuration of types. This defaulted from the dist share dir, ~/.type_categories.yml and ./.type_categories.yml
~/.type_categories.yml
./.type_categories.yml
BUILD ()
Loads the config file when new is called
file_ok ($file)
Determines if a file matches the current config
types_match ($file, $type)
Checks if a file matches $type
$type
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
Ivan Wills - (ivan.wills@gmail.com)
Copyright (c) 2014 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install File::TypeCategories, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::TypeCategories
CPAN shell
perl -MCPAN -e shell install File::TypeCategories
For more information on module installation, please visit the detailed CPAN module installation guide.