本文整理汇总了C++中PathName::AppendAltDirectoryDelimiter方法的典型用法代码示例。如果您正苦于以下问题:C++ PathName::AppendAltDirectoryDelimiter方法的具体用法?C++ PathName::AppendAltDirectoryDelimiter怎么用?C++ PathName::AppendAltDirectoryDelimiter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PathName
的用法示例。
在下文中一共展示了PathName::AppendAltDirectoryDelimiter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pathtok
MPMSTATICFUNC(void) RememberFileNameInfo(const string& prefixedFileName, const string& packageId)
{
shared_ptr<Session> session = Session::Get();
string fileName;
// ignore non-texmf files
if (!PackageManager::StripTeXMFPrefix(prefixedFileName, fileName))
{
return;
}
PathNameParser pathtok(fileName);
if (!pathtok)
{
return;
}
// initialize root path: "//MiKTeX/[MPM]"
PathName path = session->GetMpmRootPath();
// path += CURRENT_DIRECTORY;
// s1: current path name component
string s1 = *pathtok;
++pathtok;
// name: file name component
string name = s1;
while (pathtok)
{
string s2 = *pathtok;
++pathtok;
directoryInfoTable[path.ToString()].subDirectoryNames.insert(s1);
name = s2;
#if defined(MIKTEX_WINDOWS)
// make sure the the rest of the path contains slashes (not
// backslashes)
path.AppendAltDirectoryDelimiter();
#else
path.AppendDirectoryDelimiter();
#endif
path /= s1;
s1 = s2;
}
DirectoryInfo& directoryInfo = directoryInfoTable[path.ToString()];
directoryInfo.fileNames.push_back(name);
directoryInfo.packageNames.push_back(packageId);
}