choose.dir: Choose a Folder Interactively Display an OS-native folder...

Description Usage Arguments Details Value

View source: R/directoryInput.R

Description

Choose a Folder Interactively

Display an OS-native folder selection dialog under Mac OS X, Linux GTK+ or Windows.

Usage

1
choose.dir(default = NA, caption = NA, useNew = TRUE)

Arguments

default

which folder to show initially

caption

the caption on the selection dialog

useNew

boolean, selects the type of dialog shown in windows

Details

Uses an Apple Script, Zenity or Windows Batch script to display an OS-native folder selection dialog.

For Apple Script, with default = NA, the initial folder selection is determined by default behavior of the "choose folder" script. Otherwise, paths are expanded with path.expand.

For Linux, with default = NA, the initial folder selection is determined by defaul behavior of the zenity script.

The new windows batch script allows both initial folder and caption to be set. In the old batch script for Windows the initial folder is always ignored.

Value

A length one character vector, character NA if 'Cancel' was selected.


wleepang/shiny-directory-input documentation built on March 8, 2021, 12:54 p.m.