MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / removeFile

Function removeFile

src/attributes.cpp:3000–3009  ·  view source on GitHub ↗

Remove a file (call back into R for this)

Source from the content-addressed store, hash-verified

2998
2999 // Remove a file (call back into R for this)
3000 bool removeFile(const std::string& path) {
3001 if (FileInfo(path).exists()) {
3002 Rcpp::Function rm = Rcpp::Environment::base_env()["file.remove"]; // #nocov start
3003 rm(path);
3004 return true; // #nocov end
3005 }
3006 else {
3007 return false;
3008 }
3009 }
3010
3011 // Recursively create a directory (call back into R for this)
3012 void createDirectory(const std::string& path) { // #nocov start

Callers 1

removeMethod · 0.85

Calls 3

FileInfoClass · 0.85
base_envFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected