return stat(path.c_str(), &sb) == 0;
}
+bool isDirectoryExist(const std::string& path)
+{
+ struct stat sb;
+ if (stat(path.c_str(), &sb) != 0) {
+ return false;
+ } else if (sb.st_mode & S_IFDIR) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
uintptr_t getFileSize(const std::string& path)
{
struct stat sb;
memset(processName, '\0', PRC_NAME_LENGTH);
snprintf(processName, PRC_NAME_LENGTH, "%s", name.c_str());
- prctl(PR_SET_NAME, processName);
+ prctl(PR_SET_NAME, processName);
}
std::string getFileName(const std::string& path)