The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

File::TypeCategories - Determine if files match a specific type

VERSION

This documentation refers to File::TypeCategories version 0.08

SYNOPSIS

   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.

DESCRIPTION

A File::TypeCategories object can be used to test if files match the defined categories.

SUBROUTINES/METHODS

new (%hash)
ignore ArrayRef[Str] [ignore]

The types to ignore the default ignore includes:

  • build

  • backups

  • vcs

  • images

  • logs

  • editors

  • min

include ArrayRef[Str]

Match only files that match regexes in include

exclude ArrayRef[Str],

Don't match any files that match regexes in exclude

include_type ArrayRef[Str]

Match only files of types specified in include_type

exclude_type ArrayRef[Str]

Don't match files of types specified in exclude_type

Allow symlinks to match

type_suffixes HASH

The configuration of types. This defaulted from the dist share dir, ~/.type_categories.yml and ./.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

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

INCOMPATIBILITIES

BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

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.