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

dir_exists

Test the existence of files and directories


Description

These are wrapper functions of utils::file_test() to test the existence of directories and files. Note that file_exists() only tests files but not directories, which is the main difference between file.exists() in base R. If you use are using the R version 3.2.0 or above, dir_exists() is the same as dir.exists() in base R.

Usage

dir_exists(x)

file_exists(x)

Arguments

x

A vector of paths.

Value

A logical vector.


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.