Skip to contents

Lists or deletes temporary and output files produced by ADMB and Stock Synthesis. Only files directly within dir are considered; subdirectories are not searched or removed.

Usage

clean_files(dir, action = c("list", "delete"))

Arguments

dir

Directory containing the Stock Synthesis output files.

action

One or both of "list" and "delete". If "list" is included, matching file names are returned. If "delete" is included, matching files are deleted.

Value

A character vector containing the names of matching files. The result is returned invisibly when action does not include "list".

Examples

model_dir <- tempdir()
clean_files(model_dir, action = "list")
#>  No matching files found to delete.