[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#436798: ITP: libdir-purge-perl -- it implements functions to reduce the number of files in a directory according to a strategy.



Package: wnpp
Severity: wishlist
Owner: Deepak Tripathi  <apenguinlinux@gmail.com>

* Package name          : libdir-purge-perl
Version                       : 1.02
Upstream Author        : Johan Vromans <jvromans@squirrel.nl>
* URL                          : http://search.cpan.org/~jv/Dir-Purge-1.02/
* License             : GPL
Programming Lang    : Perl
Description : Dir::Purge implements functions to reduce the number of files in a directory according to a strategy. It currently provides one strategy: removal of files by age.

By default, the module exports one user subroutine: |purgedir|.

The first argument of |purgedir| should either be an integer, indicating the number of files to keep in each of the directories, or a reference to a hash with options. In either case, a value for the number of files to keep is mandatory.

The other arguments are the names of the directories that must be purged. Note that this process is not recursive. Also, hidden files (name starts with a |.|) and non-plain files (e.g., directories, symbolic links) are not taken into account.

All directory arguments and options are checked before anything else is done. In particular, all arguments should point to existing directories and the program must have read, write, and search (execute) access to the directories.

One additional function, |purgedir_by_age|, can be exported on demand, or called by its fully qualified name. |purgedir_by_age| calls |purgedir| with the "by age" purge strategy preselected. Since this happens to be the default strategy for |purgedir|, calling |purgedir_by_age| is roughly equivalent to calling |purgedir|



Reply to: