Learn R Programming

rDrop (version 0.3-0)

dropbox_dir: Function to list contents of a Dropbox folder.

Description

If no folder is specifies, it will only list contents of the root folder.

Usage

dropbox_dir(cred, path = NULL, verbose = FALSE,
    deleted = FALSE, pattern = NULL,
    curl = getCurlHandle(), ...)

Arguments

cred

An object of class DropboxCredentials with Dropobox specific credentials.

path

The directory to list. Not yet implemented

verbose

logical. FALSE returns a list with file names in root folder. TRUE returns a data.frame with the following fields: id, revision, rev, thumb_exists, bytes, path, modified, and is_dir

deleted

logical. Default is FALSE. Set to TRUE to also list deleted files.

pattern

an optional regular expression. Only file names which match the regular expression will be returned.

curl

If using in a loop, call getCurlHandle() first and pass the returned value in here (avoids unnecessary footprint)

...

optional additional curl options (debugging tools mostly).

Value

directory listing with file or folder names unless verbose = TRUE in which case a data.frame is returned.

Examples

Run this code
# NOT RUN {
dropbox_dir(db_cred)
dropbox_dir(db_cred, path='/specific_folder')
dropbox_dir(db_cred,path='/specific_folder', verbose = TRUE)
dropbox_dir(db_cred,path='/specific_folder', pattern='file', verbose = TRUE)
returns a dataframe with fields .id, revision, rev, thumb_exists, bytes, modified path, is_dir, icon, root, size, client_mtime, mimetype.
# }

Run the code above in your browser using DataLab