- COPYRIGHT & LICENSE
Mojo::File::Role::Extension - Access Mojo::File filename extensions
$file = Mojo::File->new('/some/path.txt')->with_roles('+Extension'); # .txt $file->extension; # /some/path.csv $file->switch_extension('.csv');
Add file extension access and modifying behaviour to Mojo::File.
# .txt $file->extension;
Readonly access to the file extension of the file or directory.
# ['.tar', '.gz'] $file->extension_parts;
Readonly access to the file extension(s) of the file or directory. The parts are returned as a Mojo::Collection of strings.
# path $file->moniker;
Readonly access to the short name of the file, i.e. prior to the "extension".
# /some/path.csv $file->switch_extension('.csv');
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
Roy Storey - <firstname.lastname@example.org>