drop_exists: Checks to see if a file/folder exists on Dropbox

View source: R/drop_file_ops.R

drop_existsR Documentation

Checks to see if a file/folder exists on Dropbox

Description

Since many file operations such as move, copy, delete and history can only act on files that currently exist on a Dropbox store, checking to see if the path is valid before operating prevents bad API calls from being sent to the server. This functions returns a logical response after checking if a file path is valid on Dropbox.

Usage

drop_exists(path = NULL, dtoken = get_dropbox_token())

Arguments

path

The full path to a Dropbox file

dtoken

The Dropbox token generated by drop_auth. rdrop2 will try to automatically locate your local credential cache and use them. However, if the credentials are not found, the function will initiate a new authentication request. You can override this in drop_auth by pointing to a different location where your credentials are stored.

Value

boolean; TRUE is the file or folder exists, FALSE if it does not.

Examples

## Not run: 
  drop_create("existential_test")
  drop_exists("existential_test")
  drop_delete("existential_test")

## End(Not run)


karthik/rdrop2 documentation built on March 28, 2024, 5:51 a.m.