# NOT RUN {
## list "My Drive" w/o regard for folder hierarchy
drive_find()
## filter for folders, the easy way and the hard way
drive_find(type = "folder")
drive_find(q = "mimeType = 'application/vnd.google-apps.folder'")
## filter for Google Sheets, the easy way and the hard way
drive_find(type = "spreadsheet")
drive_find(q = "mimeType='application/vnd.google-apps.spreadsheet'")
## files whose names match a regex
drive_find(pattern = "jt")
## search for files located directly in your root folder
drive_find(q = "'root' in parents")
## FYI: this is equivalent to
drive_ls("~/")
## control page size or cap the number of files returned
drive_find(pageSize = 50)
## all params passed through `...` can be camelCase or snake_case
drive_find(page_size = 50)
drive_find(n_max = 58)
drive_find(page_size = 5, n_max = 15)
## various ways to specify q search clauses
## multiple q's
drive_find(q = "name contains 'TEST'",
q = "modifiedTime > '2017-07-21T12:00:00'")
## vector q
drive_find(q = c("starred = true", "visibility = 'anyoneWithLink'"))
## default `trashed = FALSE` excludes files in the trash
## `trashed = TRUE` consults ONLY file in the trash
drive_find(trashed = TRUE)
## `trashed = NA` disregards trash status completely
drive_find(trashed = NA)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab