NAME
Mojo::File::Role::HomeDir - Adds File::HomeDir methods to Mojo::File objects
SYNOPSIS
use Mojo::File;
use Mojo::File::Role::HomeDir;
my $file = Mojo::File->new->with_roles('+Mojo::File::Role::HomeDir');
# Use the methods provided by File::HomeDir:
my $home_dir = $file->my_home;
my $desktop_dir = $file->my_desktop;
my $documents_dir = $file->my_documents;
# ... and others
DESCRIPTION
This role adds a collection of directory-related methods from File::HomeDir to Mojo::File objects. Each method returns a new Mojo::File object pointing to the directory path provided by File::HomeDir.
The following methods are added:
my_home
my_desktop
my_documents
my_music
my_pictures
my_videos
my_data
my_dist_config
my_dist_data
users_home
users_documents
users_data
users_desktop
users_music
users_pictures
users_videos
METHODS
Each method corresponds to the similarly named method in File::HomeDir. They return a Mojo::File object pointing to the directory.
AUTHOR
Simone Cesano <scesano@cpan.org>
LICENSE
This software is copyright (c) 2025 by Simone Cesano.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.