Skip to content

Commit 6905fe6

Browse files
committed
doc
1 parent 9c9406b commit 6905fe6

File tree

10 files changed

+328
-90
lines changed

10 files changed

+328
-90
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export(backup)
88
export(backup_date)
99
export(backup_info)
1010
export(backup_time)
11-
export(list_backups)
1211
export(n_backups)
1312
export(newest_backup)
1413
export(oldest_backup)

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# rotor (development version)
1+
# rotor 0.2.2.9000
22

33
* Changed default behaviour of `rotate_date()`, `rotate_time()`, etc...: If
44
no backups exist of target file, use the "created" timestamp
@@ -24,7 +24,7 @@
2424
* R6 API: BackupQueue* now use setters/getters for all fields.
2525

2626

27-
# rotor 0.2.1 (2019-05-15)
27+
# rotor 0.2.1
2828

2929
* added examples to `rotate()` documentation
3030
* `dry_run` status is now tracked internally instead of a potentially user

R/BackupQueue.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#' An R6 class for managing backups
2+
#'
23
#' @description
34
#' `BackupQueue` & co are part of the [R6][R6::R6] API of **rotor**. They are
45
#' used internally by [rotate()] and related functions and are not designed

R/list_backups.R

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#' Helpers for working with backups
1+
#' Discover existing backups
22
#'
3-
#' `n_backups()`, `list_backups()`, `newest_backup()` and `oldest_backup()`
4-
#' display information on the backups (that follow the naming conventions of
5-
#' rotor) of a single file.
3+
#' These function return information on the backups of a file (if any exist)
64
#'
75
#' @param file `character` scalar: Path to a file.
86
#' @inheritSection rotate Intervals
@@ -26,19 +24,9 @@
2624
#' prune_backups(tf, 0)
2725
#' n_backups(tf)
2826
#' file.remove(tf)
29-
list_backups <- function(
30-
file,
31-
backup_dir = dirname(file)
32-
){
33-
BackupQueue$new(file, backup_dir = backup_dir)$backups$path
34-
}
35-
36-
37-
38-
39-
#' @rdname list_backups
4027
#' @export
41-
#' @return `backup_info()` returns a `data.frame` similar to [file.info()]
28+
#' @return `backup_info()` returns a `data.frame` similar to the output of
29+
#' [file.info()]
4230
backup_info <- function(
4331
file,
4432
backup_dir = dirname(file)
@@ -54,9 +42,21 @@ backup_info <- function(
5442

5543

5644

57-
#' @rdname list_backups
58-
#' @export
5945
#' @return `list_backups()` returns the paths to all backups of `file`
46+
#' @rdname backup_info
47+
list_backups <- function(
48+
file,
49+
backup_dir = dirname(file)
50+
){
51+
BackupQueue$new(file, backup_dir = backup_dir)$backups$path
52+
}
53+
54+
55+
56+
#' @rdname backup_info
57+
#' @export
58+
#' @return `n_backups()` returns the number of backups of `file` as an `integer`
59+
#' scalar
6060
n_backups <- function(
6161
file,
6262
backup_dir = dirname(file)
@@ -78,7 +78,7 @@ n_backups <- function(
7878
#' @return `newest_backup()` and `oldest_backup()` return the paths to the
7979
#' newest or oldest backup of `file` (or an empty `character` vector if none exist)
8080
#' @export
81-
#' @rdname list_backups
81+
#' @rdname backup_info
8282
newest_backup <- function(
8383
file,
8484
backup_dir = dirname(file)
@@ -109,7 +109,7 @@ newest_backup <- function(
109109

110110

111111
#' @export
112-
#' @rdname list_backups
112+
#' @rdname backup_info
113113
oldest_backup <- function(
114114
file,
115115
backup_dir = dirname(file)

docs/index.html

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/news/index.html

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/backup_info.html

Lines changed: 226 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/index.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)