Skip to contents

Renames and archives a file with a timestamp if it already exists. Use for preserving previous outputs or logs before overwriting.

Usage

archive_file(file_path)

Arguments

file_path

character(1). Path to file to archive.

Value

NULL. Side effect: file renamed if exists.

Details

  • Checks if file exists; renames with creation timestamp.

  • Returns nothing; side effect is file rename.

Settings

None.

See also

Other utility functions: clip.vector(), fillna(), weighted.median(), weighted.percentile()

Examples

## Not run:
archive_file('output.html')