fileBrowser {psichomics} | R Documentation |
Interactive folder selection using a native dialogue
fileBrowser(default = NULL, caption = NULL, multiple = FALSE, directory = FALSE, system = Sys.info()["sysname"])
default |
Character: path to initial folder |
caption |
Character: caption on the selection dialogue |
multiple |
Boolean: allow to select multiple files? |
directory |
Boolean: allow to select directories instead of files? |
system |
Character: system name |
For macOS, it uses an Apple Script to display a folder selection dialogue.
With default = NA
, the initial folder selection is determined by
default behaviour of the "choose folder" Apple Script command. Otherwise,
paths are expanded with path.expand.
In Windows, it uses either 'utils::choose.files' or 'utils::choose.dir'.
A length one character vector, character NA if 'Cancel' was selected.
Original code by wleepang: https://github.com/wleepang/shiny-directory-input