-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dev: Checks if the project looks like an R project and asks for confirmation. #227 Add functionality to force re-installation of all discovered packages and dependencies. #183 Run Travis tests also for NOT_CRAN="false" Test if logfile exists must be skipped on CRAN #225 Add function to list checkpoint archives and remove archives #228
Showing
11 changed files
with
179 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
|
||
#' List checkpoint archives on disk. | ||
#' | ||
#' @inheritParams checkpoint | ||
#' @export | ||
#' @seealso checkpointRemove | ||
#' @example inst/examples/example_remove.R | ||
checkpointArchives <- function(checkpointLocation = "~/"){ | ||
z <- list.files(path = paste0(normalizePath(checkpointLocation), ".checkpoint"), | ||
pattern = "\\d{4}-\\d{2}-\\d{2}", | ||
full.names = TRUE) | ||
normalizePath(z, winslash = "/") | ||
} | ||
|
||
#' Remove checkpoint archive from disk. | ||
#' | ||
#' @inheritParams checkpoint | ||
#' @export | ||
#' @seealso checkpointArchives | ||
#' @example inst/examples/example_remove.R | ||
checkpointRemove <- function(snapshotDate, checkpointLocation = "~/"){ | ||
z <- list.files(path = paste0(normalizePath(checkpointLocation), ".checkpoint"), | ||
pattern = paste0(snapshotDate, "$"), | ||
full.names = TRUE) | ||
to_delete <- normalizePath(z, winslash = "/") | ||
if(length(to_delete) == 0) { | ||
warning("archive not found") | ||
invisible(NULL) | ||
} else { | ||
res <- unlink(to_delete, recursive = TRUE) | ||
if(res == 0) message("successfully removed archive") | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
checkpointArchives() | ||
\dontrun{ | ||
checkpointRemove("2016-10-01") | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters