Running examples in 'hoardr-Ex.R' failed
The error most likely occurred in:

> ### Name: hoard
> ### Title: hoardr class
> ### Aliases: hoard
> 
> ### ** Examples
> 
> (x <- hoard())
<hoard> 
  path: 
  cache path: 
> x$cache_path_set(path = "foobar", type = 'tempdir')
[1] "D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/R/foobar"
> x
<hoard> 
  path: foobar
  cache path: D:\temp\2024_12_22_01_50_00_26287\RtmpWAP9EJ/R/foobar
> x$path
[1] "foobar"
> x$cache_path_get()
[1] "D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/R/foobar"
> 
> # Or you can set the full path directly with `full_path`
> mydir <- file.path(tempdir(), "foobar")
> x$cache_path_set(full_path = mydir)
[1] "D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar"
> x
<hoard> 
  path: foobar
  cache path: D:\temp\2024_12_22_01_50_00_26287\RtmpWAP9EJ/foobar
> x$path
[1] "foobar"
> x$cache_path_get()
[1] "D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar"
> 
> # make the directory if doesn't exist already
> x$mkdir()
> 
> # list files in dir
> x$list()
character(0)
> cat(1:10000L, file = file.path(x$cache_path_get(), "foo.txt"))
> x$list()
[1] "D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar/foo.txt"
> 
> # add more files
> cat(letters, file = file.path(x$cache_path_get(), "foo2.txt"))
> cat(LETTERS, file = file.path(x$cache_path_get(), "foo3.txt"))
> 
> # see if files exist
> x$exists("foo.txt") # exists
                                                           files exists
1 D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar/foo.txt   TRUE
> x$exists(c("foo.txt", "foo3.txt")) # both exist
                                                            files exists
1  D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar/foo.txt   TRUE
2 D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar/foo3.txt   TRUE
> x$exists(c("foo.txt", "foo3.txt", "stuff.txt")) # one doesn't exist
                                                             files exists
1   D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar/foo.txt   TRUE
2  D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar/foo3.txt   TRUE
3 D:\\temp\\2024_12_22_01_50_00_26287\\RtmpWAP9EJ/foobar/stuff.txt  FALSE
> 
> # cache details
> x$details()
<cached files>
  directory: D:\temp\2024_12_22_01_50_00_26287\RtmpWAP9EJ/foobar

Warning in sub(attr(x, "cpath"), "", x[[i]]$file) :
  TRE pattern compilation error 'Invalid back reference'
Error in sub(attr(x, "cpath"), "", x[[i]]$file) : 
  invalid regular expression 'D:\temp\2024_12_22_01_50_00_26287\RtmpWAP9EJ/foobar', reason 'Invalid back reference'
Calls: <Anonymous> -> print.cache_info -> cat -> paste0 -> sub
Execution halted