Rcpp_FileExist
C++ Function Reference
1 Signature
bool BigDataStatMeth::Rcpp_FileExist(std::string fullPath)2 Description
Checks if a file exists at the specified path.
3 Parameters
fullPath(std::string): Complete file path to check
4 Returns
bool True if file exists, false otherwise
5 Details
fullPathComplete file path to check bool True if file exists, false otherwise File check:Uses system calls to verify existenceHandles both relative and absolute pathsThread-safe implementation
6 Source Code
NoteImplementation
File: inst/include/Utilities/Utilities.hpp • Lines 474-487
inline bool Rcpp_FileExist(std::string fullPath)
{
bool exists = false;
std::fstream fileStream;
fileStream.open(fullPath);
if (fileStream.good()) {
exists = true;
} else {
exists = false;
}
return(exists);
}7 Usage Example
#include "BigDataStatMeth.hpp"
// Example usage
auto result = Rcpp_FileExist(...);