How to select a folder directory as text like "~/R_code/session_1" in R shiny?

Please take look to our cross-posting policy, simply dropping a link to a SO question is not considered OK here.