ropensci/hoardr

Name: hoardr

Owner: rOpenSci

Description: manage cached files

Created: 2017-01-12 18:27:17.0

Updated: 2017-09-24 14:51:51.0

Pushed: 2018-01-05 19:33:44.0

Homepage: https://ropensci.github.io/hoardr/

Size: 53

Language: R

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

hoardr

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Build Status codecov.io rstudio mirror downloads cran version

hoard - manage cached files

Exposes a single R6 object so that when the package is imported in another package for managing cached files, you don't need to pollute the NAMESPACE with a bunch of functions. (you can always just hoardr::fxn, but with a single object there are other benefits as well [maintaining state, e.g.]).

install

stable

all.packages("hoardr")

dev version

ools::install_github("ropensci/hoardr")

ary(hoardr)
usage

initialize client

- hoardr::hoard())
hoard> 
 path: 
 cache path: /var/folders/gs/4khph0xs0436gmd2gdnwsg080000gn/T//RtmpMKopcW/R/stuffthings

set cache path

che_path_set("foobar", type = 'tempdir')
1] "/var/folders/gs/4khph0xs0436gmd2gdnwsg080000gn/T//RtmpMKopcW/R/foobar"

make the directory if doesn't exist

dir()

put a file in the cache

"hello world", file = file.path(x$cache_path_get(), "foo.txt"))

list the files

st()
1] "/var/folders/gs/4khph0xs0436gmd2gdnwsg080000gn/T//RtmpMKopcW/R/foobar/foo.txt"

details

tails()
cached files>
 directory: /var/folders/gs/4khph0xs0436gmd2gdnwsg080000gn/T//RtmpMKopcW/R/foobar

 file: /foo.txt
 size: 0 mb

delete by file name

lete("foo.txt")
st()
haracter(0)
todo

see issue 1

Meta

rofooter


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.