You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
proxysql/include/fileutils.hpp

17 lines
368 B

#include <unistd.h>
#ifndef __CLASS_FILEUTILS_H
#define __CLASS_FILEUTILS_H
class FileUtils {
public:
static bool isReadable(const char *pathname) {
if (access(pathname, R_OK)==0) return true;
return false;
};
static bool isWritable(const char *pathname) {
if (access(pathname, W_OK)==0) return true;
return false;
};
};
#endif /* __CLASS_FILEUTILS_H */