Returns the directory containing a file
| 40 | |
| 41 | // Returns the directory containing a file |
| 42 | std::wstring GetDirectoryFromFilePath(const wchar* filePath_) |
| 43 | { |
| 44 | Assert_(filePath_); |
| 45 | |
| 46 | std::wstring filePath(filePath_); |
| 47 | size_t idx = filePath.rfind(L'\\'); |
| 48 | if(idx != std::wstring::npos) |
| 49 | return filePath.substr(0, idx + 1); |
| 50 | else |
| 51 | return std::wstring(L""); |
| 52 | } |
| 53 | |
| 54 | // Returns the name of the file given the path (extension included) |
| 55 | std::wstring GetFileName(const wchar* filePath_) |
no outgoing calls
no test coverage detected