Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mark_dirs

Mark some paths as directories


Description

Add a trailing backlash to a file path if this is a directory. This is useful in messages to the console for example to quickly identify directories from files.

Usage

mark_dirs(x)

Arguments

x

Character vector of paths to files and directories.

Details

If x is a vector of relative paths, directory test is done with path relative to the current working dir. Use xfun::in_dir() or use absolute paths.

Examples

mark_dirs(list.files(find.package("xfun"), full.names = TRUE))

xfun

Miscellaneous Functions to Support Packages Maintained by 'Yihui Xie'

v0.22
MIT + file LICENSE
Authors
Yihui Xie [aut, cre, cph] (<https://orcid.org/0000-0003-0645-5666>), Wush Wu [ctb], Daijiang Li [ctb], Xianying Tan [ctb], Salim Brüggemann [ctb] (<https://orcid.org/0000-0002-5329-5987>), Christophe Dervieux [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.