Skip to contents

Normalize to Unix paths

Usage

to_unix_path(x)

to_gitbash_path(x)

print_paths(x, win = T)

Arguments

x

Character. Paths.

Value

Character

Examples

fp = 'C:\\Users\\rd\\bin\\export_docs_pdf.R'
to_unix_path(fp)
#> Warning: path[1]="C:\Users\rd\bin\export_docs_pdf.R": 系統找不到指定的路徑。
#> [1] "C:/Users/rd/bin/export_docs_pdf.R"
to_gitbash_path(fp)
#> Warning: path[1]="C:\Users\rd\bin\export_docs_pdf.R": 系統找不到指定的路徑。
#> [1] "/C/Users/rd/bin/export_docs_pdf.R"
get_cli_programs(F) |> print_paths()
#> C:\Users\tomliao\AppData\Local\Programs\R\R-4.2.3\library\stom\cli\export_docs_pdf.R
#> C:\Users\tomliao\AppData\Local\Programs\R\R-4.2.3\library\stom\cli\extract_column.R
#> C:\Users\tomliao\AppData\Local\Programs\R\R-4.2.3\library\stom\cli\pandoc_html.R
#> C:\Users\tomliao\AppData\Local\Programs\R\R-4.2.3\library\stom\cli\pandoc_pdf.R
#> C:\Users\tomliao\AppData\Local\Programs\R\R-4.2.3\library\stom\cli\pdf2img.R
#> C:\Users\tomliao\AppData\Local\Programs\R\R-4.2.3\library\stom\cli\pdf2png.R
#> C:\Users\tomliao\AppData\Local\Programs\R\R-4.2.3\library\stom\cli\pdf2svg.R
#> C:\Users\tomliao\AppData\Local\Programs\R\R-4.2.3\library\stom\cli\svg2png.R