36 #define TF_FILESTATUS_CC_VERSION \ 37 "TF_FILESTATUS_CC V1.1" 42 #include <tfxx/filestatus.h> 43 #include <sys/types.h> 58 char *thepath=strdup(path);
59 std::string dir(
dirname(thepath));
60 bool retval=(access(dir.c_str(), W_OK)==0);
74 bool retval=(stat(path, &status)==0);
84 bool retval=(access(path, W_OK)==0);
95 if (
exists(path)) { retval=(access(path, R_OK)==0); }
107 if (stat(path, &status)==0) { retval=S_ISREG(status.st_mode); }
115 std::string retval(path);
117 while (
exists(retval.c_str()))
120 std::ostringstream oss;
121 oss << path <<
"_" << i;
bool writable(const char *path)
bool regular(const char *path)
bool creatable(const char *path)
std::string dirname(const std::string &path)
return path with its last non-slash component removed
std::string uniquenew(const char *path)
bool readable(const char *path)
bool exists(const char *path)
Namespace containing all code of library libtfxx.