remove_old_dirs: Remove directories older than a specified day

View source: R/remove_old_directories.R

remove_old_dirsR Documentation

Remove directories older than a specified day

Description

This function removes directories in the specified base directory that are older than a specified maximum age in days. It logs the removed directories and any errors encountered during removal.

Usage

remove_old_dirs(
  base_dir,
  max_age_in_days = 3,
  log_file = "remove_old_dirs.log",
  verbose = FALSE
)

Arguments

base_dir

The base directory to search for old directories.

max_age_in_days

The maximum age (in days) for directories to be considered old.

log_file

The name of the log file to store information about removed directories and errors.

verbose

A logical value indicating whether to print messages to the console.

Value

The function does not return anything. It logs information about removed directories and errors.


shinyWGD documentation built on April 4, 2025, 2:28 a.m.