Commit 4a6bf11e authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander Trofimov

Добавлена функция GetFolderPath.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63328 954022d7-b5bf-4e40-9824-e11837661b57
parent 77b7f988
......@@ -286,6 +286,20 @@ namespace NSDirectory
if (deleteRoot = false)CreateDirectory(strDirectory);
#endif
}
static std::wstring GetFolderPath(const std::wstring& wsFolderPath)
{
int n1 = wsFolderPath.rfind('\\');
if (n1 < 0)
{
n1 = wsFolderPath.rfind('/');
if (n1 < 0)
{
return L"";
}
return wsFolderPath.substr(0, n1);
}
return wsFolderPath.substr(0, n1);
}
}
#endif //_BUILD_DIRECTORY_CROSSPLATFORM_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment