| 840 | |
| 841 | |
| 842 | bool createRecursionDir(std::string path) |
| 843 | { |
| 844 | if (path.length() == 0) return true; |
| 845 | std::string sub; |
| 846 | fixPath(path); |
| 847 | |
| 848 | std::string::size_type pos = path.find('/'); |
| 849 | while (pos != std::string::npos) |
| 850 | { |
| 851 | std::string cur = path.substr(0, pos-0); |
| 852 | if (cur.length() > 0 && !isDirectory(cur)) |
| 853 | { |
| 854 | bool ret = false; |
| 855 | #if defined (WIN32) || defined(_WIN64) |
| 856 | ret = CreateDirectoryA(cur.c_str(), NULL) ? true : false; |
| 857 | #else |
| 858 | ret = (mkdir(cur.c_str(), S_IRWXU|S_IRWXG|S_IRWXO) == 0); |
| 859 | #endif |
| 860 | if (!ret) |
| 861 | { |
| 862 | return false; |
| 863 | } |
| 864 | } |
| 865 | pos = path.find('/', pos+1); |
| 866 | } |
| 867 | |
| 868 | return true; |
| 869 | } |
| 870 | |
| 871 | unsigned int getProcessID() |
| 872 | { |
no test coverage detected