Crate logrotate

Crate logrotate 

Source

Enums§

ArchiveType
only allow explicit values and assign an extension type for each this is used to only allow specific archive types as flags for cli
FileType
This incorporates some of the archive types along with several other extensions for possible log files

Functions§

actual_run
archive_remove_truncate_file_bucketing
meat and potatoes - consumes file and steps through bucketing logic (remove, archive, truncate)
archive_selection_and_process
dry_run_details
Do not worry about testing this function - only renders a file list to stdout
gather_files_from_directory
Create a vector to store all unfiltered files in the provided directory
get_date
get_file_extension
Get a file extension type from a provided file path
get_file_mtime_diff
Self-explanatory
remove_file
Remove a provided file via it’s path
tar_file
Create a non-compressed tarball of a provided file
tar_gunzip_file
Create a tarball of a provided file and compress
test_add
Fake test function
truncate_file
Truncate a provided file
zip_file
Create a zip archive of a provided file