14 lines
339 B
R
14 lines
339 B
R
|
|
#' Load the latest snapshot state from the lock file
|
|
#'
|
|
#' @return A list containing the last saved snapshot of the project state
|
|
#' @import jsonlite
|
|
#' @export
|
|
snapshot_latest <- function() {
|
|
if (!file.exists("pacman.lock")) {
|
|
return(NULL)
|
|
}
|
|
state <- jsonlite::read_json("pacman.lock")
|
|
state$history <- NULL
|
|
return(state)
|
|
} |