| 45 | return path; |
| 46 | } |
| 47 | bool FindNBFDirectory(const string& basedir, string& directory) |
| 48 | { |
| 49 | WIN32_FIND_DATA wfd; |
| 50 | HANDLE hFind= FindFirstFile(concatpath(basedir,"\\*").c_str(), &wfd); |
| 51 | if (hFind==NULL || hFind==INVALID_HANDLE_VALUE) |
| 52 | { |
| 53 | error("FindFirstFile('%s')", basedir.c_str()); |
| 54 | return false; |
| 55 | } |
| 56 | |
| 57 | int nDirectoryCount= 0; |
| 58 | do { |
| 59 | if (wfd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) |
| 60 | { |
| 61 | if (strcmp(wfd.cFileName, ".") && strcmp(wfd.cFileName, "..")) |
| 62 | { |
| 63 | nDirectoryCount++; |
| 64 | if (nDirectoryCount==1) |
| 65 | directory= concatpath(basedir,wfd.cFileName); |
| 66 | } |
| 67 | } |
| 68 | } while (FindNextFile(hFind, &wfd)); |
| 69 | |
| 70 | FindClose(hFind); |
| 71 | |
| 72 | return (nDirectoryCount==1); |
| 73 | } |
| 74 | |
| 75 | XDAOsImageWriter::XDAOsImageWriter() |
| 76 | { |
no test coverage detected