NAME

RecentInfo::Manager - manage recent documents

SYNOPSIS

use RecentInfo::Manager 'add_recent_file';
add_recent_file('output.pdf');

# oo interface
my $mgr = RecentInfo::Manager->new();
$mgr->load();
$mgr->add('output.pdf');
$mgr->save;

FUNCTIONS

add_recent_file $filename, $file_options

add_recent_file( 'output.pdf', { mime_type => 'application/pdf' } );

Adds output.pdf as a recently used (or created) file for the current application. If the MIME filetype is not given, it is inferred from the filename.

remove_recent_file $filename

remove_recent_file( 'oops.xls' );

Removes the given file from the list of recently accessed files.

recent_files $options

my @entries = recent_files( { mime_type => 'application/pdf' });

Returns a list of filenames of the recently accessed files. In the options hash, you can pass in the following keys:

mime_type - search for the given MIME type. * is a wildcard.
app - search for the given application name.

METHODS

The module also acts as a factory for OS-specific implementations.

->new

my $mgr = RecentInfo::Manager->new();
$mgr->load();
$mgr->add('output.pdf');
$mgr->save;

SEE ALSO

Mac::RecentDocuments - recent documents for old MacOS

REPOSITORY

The public repository of this module is https://github.com/Corion/RecentInfo-Manager.

SUPPORT

The public support forum of this module is https://perlmonks.org/.

BUG TRACKER

Please report bugs in this module via Github at https://github.com/Corion/RecentInfo-Manager/issues

AUTHOR

Max Maischein corion@cpan.org

COPYRIGHT (c)

Copyright 2024-2024 by Max Maischein corion@cpan.org.

LICENSE

This module is released under the same terms as Perl itself.