Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

BackupQueueIndex

An R6 class for managing indexed backups


Description

A BackupQueue for indexed backups, e.g. foo.log, foo.1.log, foo.2.log, ...

Details

This class is part of the R6 API of rotor which is intended for developers that want to extend this package. For normal usage, the simpler functional API is recommended (see rotate()).

Super classes

Methods

Public methods


Method push()

Create a new index-stamped backup (e.g. ‘logfile.1.log’)

Usage
BackupQueueIndex$push()

Method prune()

Usage
BackupQueueIndex$prune(max_backups = self$max_backups)

Method prune_identical()

Usage
BackupQueueIndex$prune_identical()

Method should_rotate()

Should a file of size be rotated? See size argument of rotate()

Usage
BackupQueueIndex$should_rotate(size, verbose = FALSE)
Returns

TRUE or FALSE


Method pad_index()

Pad the indices in the filenames of indexed backups to the number of digits of the largest index. Usually does not have to be called manually.

Usage
BackupQueueIndex$pad_index()

Method increment_index()

Increment die Indices of all backups by n Usually does not have to be called manually.

Usage
BackupQueueIndex$increment_index(n = 1)
Arguments
n

integer > 0

See Also


rotor

Log Rotation and Conditional Backups

v0.3.5
MIT + file LICENSE
Authors
Stefan Fleck [aut, cre] (<https://orcid.org/0000-0003-3344-9851>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.