Filename::Compressed - Check whether filename indicates being compressed
This document describes version 0.04 of Filename::Compressed (from Perl distribution Filename-Compressed), released on 2015-09-03.
use Filename::Compressed qw(check_compressed_filename); my $res = check_compressed_filename(filename => "foo.txt.gz"); if ($res) { printf "File is compressed with %s, uncompressed name: %s\n", $res->{compressor_name}, $res->{uncompressed_filename}; } else { print "File is not compressed\n"; }
Check whether filename indicates being compressed.
Arguments ('*' denotes required arguments):
ci => bool (default: 1)
Whether to match case-insensitively.
filename* => str
Return value: (bool|hash)
Return false if no compressor suffixes detected. Otherwise return a hash of information, which contains these keys: compressor_name, compressor_suffix, uncompressed_filename.
compressor_name
compressor_suffix
uncompressed_filename
Filename::Archive
Please visit the project's homepage at https://metacpan.org/release/Filename-Compressed.
Source repository is at https://github.com/perlancar/perl-Filename-Compressed.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Filename-Compressed
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2015 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Filename::Compressed, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Filename::Compressed
CPAN shell
perl -MCPAN -e shell install Filename::Compressed
For more information on module installation, please visit the detailed CPAN module installation guide.