Returns the long name of the specified file. @param p_File File path. @return Long file name.
| 60 | // @return Long file name. |
| 61 | // |
| 62 | std::wstring LongNamePlugin::GetPath(const std::wstring& p_File) const |
| 63 | { |
| 64 | // Call parent to get the long path. |
| 65 | std::wstring longPath = LongPathPlugin::GetPath(p_File); |
| 66 | |
| 67 | // Get the last part, the file name. |
| 68 | size_t lastDelimiterPos = longPath.find_last_of(L"/\\"); |
| 69 | if (lastDelimiterPos == longPath.size() - 1) { |
| 70 | // Delimiter is at the end, remove it and get name just before that. |
| 71 | longPath = longPath.substr(0, lastDelimiterPos); |
| 72 | lastDelimiterPos = longPath.find_last_of(L"/\\"); |
| 73 | } |
| 74 | return lastDelimiterPos != std::wstring::npos |
| 75 | ? longPath.substr(lastDelimiterPos + 1) : longPath; |
| 76 | } |
| 77 | |
| 78 | // |
| 79 | // Determines if this plugin is androgynous. It is considered androgynous |