R/pasteWinpath.R

Defines functions pasteWinpath

Documented in pasteWinpath

#' pasteWinpath gsub wrapper. By default changes \ to / from windows paths from cliboard.
#'
#' @param sub Optional gsub to replace '\\' with in converted path. Set to '\\\\' to ignore.
#'
#' @export

pasteWinpath <- function(sub = "/"){
  path <- utils::readClipboard()
  path <- gsub("\\\\", sub, path)
  return(path)
}

#' @rdname pasteWinpath
#' @export
pasteURL <- pasteWinpath
brandonsie/bms documentation built on Nov. 17, 2023, 11:38 a.m.