void SessionImpl::SetRecorderPath (/*[in]*/ const PathName & path) { if (! (recordingFileNames || recordingPackageNames)) { return; } if (fileNameRecorderStream.IsOpen()) { return; } fileNameRecorderStream.Attach(File::Open(path, FileMode::Create, FileAccess::Write)); PathName cwd; cwd.SetToCurrentDirectory (); fileNameRecorderStream.WriteFormattedLine ("PWD %s", cwd.ToUnix().Get()); vector<FileInfoRecord> fileInfoRecords = GetFileInfoRecords(); for (vector<FileInfoRecord>::const_iterator it = fileInfoRecords.begin(); it != fileInfoRecords.end(); ++ it) { fileNameRecorderStream.WriteFormattedLine ("%s %s", (it->access == FileAccess::Read ? "INPUT" : "OUTPUT"), PathName(it->fileName).ToUnix().Get()); } fileNameRecorderStream.Flush(); }
void TpmParser::GetFiles (/*[in]*/ const XML_Char * lpszFiles, /*[out]*/ vector<string> & files) { MIKTEX_ASSERT (Utils::IsAscii(lpszFiles)); for (Tokenizer tok (lpszFiles, X_(";\n\r \t")); tok.GetCurrent() != 0; ++ tok) { PathName path (tok.GetCurrent()); #if defined(MIKTEX_UNIX) path.ToUnix (); #endif if (texMFPrefix.length() == 0 || (PathName::Compare(texMFPrefix, path, texMFPrefix.length()) == 0)) { files.push_back (path.ToString()); } } }