The goal of boxrdrive is to make it easier to access Box from your local computer, using Box Drive. This may be useful in institutional settings, where you may not have access to a Box App, a requirement to use boxr.
Box Drive provides you access to your Box files as a native part of your computer’s filesystem; it relies on the same authentication method your institution provides when you log into the Box web portal. The idea of boxrdrive is to make it easier to compose device-independent file paths to your local computer’s Box Drive.
Let’s say that you wish to access a file in your Box filespace. Using Box Drive, files and folders are identified using paths, e.g. major_project/key_file.csv
. This path’s location on your computer depends on its OS:
Windows: C:\Users\AFauci\Box\major_project\key_file.csv
MacOS: /Users/AFauci/Box/major_project/key_file.csv
These are the standard locations to mount Box Drive; you may have a custom location.
You can access Box Drive paths using:
library("boxrdrive")
box_drive("major_project", "key_file.csv")
On MacOS, this returns something like:
On Windows:
This package figures out if and where Box Drive is mounted to your file system. Its main function, box_drive()
, uses the fs package to compose an absolute path, similar in philosophy to here::here()
.
There is also a diagnostic function:
This package is not on CRAN; you can install it from GitHub with:
# install.packages("remotes")
remotes::install_github("r-box/boxrdrive")
Please note that the boxrdrive project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.