Very simple change, so that is not necessary to pass a trailing slash (/) to the dir argument of cache_rds. This is specially useful when the using file.path() itself for the dir argument, such as:
Maybe it is a better practice to always use a trailing slash for folders and no slash for files, but it is not always practical. The output of here::here(), for example, doesn't differ between folder and files in this way.
Please let me know if I am doing something wrong, or just disregard the PR. Thank you for these great miscellaneous functions :)
Very simple change, so that is not necessary to pass a trailing slash (
/
) to thedir
argument ofcache_rds
. This is specially useful when the usingfile.path()
itself for thedir
argument, such as:Maybe it is a better practice to always use a trailing slash for folders and no slash for files, but it is not always practical. The output of
here::here()
, for example, doesn't differ between folder and files in this way.Please let me know if I am doing something wrong, or just disregard the PR. Thank you for these great miscellaneous functions :)