dvs_get.Rd
get or update files if they are in shared storage to add to the local repo
dvs_get(files, split_output = FALSE)
file paths or glob patterns to get from the storage directory
when split_output is true, a list of two data frames -
successes
and failures
- is returned.
Rows in successes
are files successfully retrieved, and rows in failures
are inputs that returned errors.
When split_output is false, the output is a single data frame with all files
attempted to recopy to the project directory,
and whose success or failure is indicated as such in the outcome column.
one or two data frames whose rows are the files attempted to get in the given operation.
retrieves files previously added with dvs_add to the storage directory (initialized by dvs_init). If a file is explicitly inputted without a corresponding dvs metadata file i.e. hasn't been added yet with dvs_add, the command returns an error.
For any other error retrieving a particular file, the function itself will indicate the error type and message in the data frame output; the function itself will not return an error.
if (FALSE) { # \dontrun{
# would get all previously added files in data/derived from
# the initialized storage directory
dvs_get("data/derived/*.dvs")
# would get all files in data/derived (excluding
# .gitignore files) and ~Projects/project_x/large_file.pdf
# from the initialized storage directory
dvs_get(c("data/derived/*", "~Projects/project_x/large_file.pdf"))
} # }