An R package 📦 to safely set & use a path to a private network.
The package has 3 functions to safely set & use a path to a private network:
set_network_path()
: adds an environment variable called SAFEPATHS_NETWORK_PATH
to
your .Renviron
file and sets the variable to a provided network
path.
get_network_path()
: retrieves the environment variable SAFEPATHS_NETWORK_PATH
, which is stored in your .Renviron
file using set_network_path()
.
use_network_path()
: retrieves and uses the stored network path in conjunction with a provided file or folder path.
use_network_path("file.csv")
use_network_path("folder_name/file.csv")
You can install the package directly from this repository. To do so, you will need the remotes package:
install.packages("remotes")
Next, install safepaths
package using
remotes::install_github()
:
library("remotes")
install_github("bcgov/safepaths")
"P:/folder_name"
or "//UNC_path"
."/Volumes/server_name/folder_name"
. You can find the server_name
for mounted remote drives by opening the Terminal and asking with this code ls /Volumes
.To report bugs/issues/feature requests, please file an issue.
If you would like to contribute to the package, please see our CONTRIBUTING guidelines.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Copyright 2020 Province of British Columbia
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
This project was created using the bcgovr package.