GetDirectory: prompts the user for a directory

Description Usage Arguments Details

Description

prompts the user for a directory

Usage

1
2
GetDirectory(msg = "please enter a path to the directory",
  create.if.missing = FALSE)

Arguments

msg

the prompt to show to the user

create.if.missing

boolean whether to create the directory if it is missing or prompt

Details

after the user enters in a directory, it will check if the directory exists. If it doesn't, it will prompt the user if they want to create it, or if create.if.missing is TRUE will create it without asking. It will only create the directory itself, not parent directories. e.g. if the user enters /a/b/c and /a/b doesn't exist, it will not create it. But if /a/b exists and /a/b/c doesn't exist, it will prompt to create c


peichins/userinput documentation built on May 25, 2019, 12:44 a.m.