コード例 #1
0
ファイル: files.cpp プロジェクト: bngabonziza/miktex
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();

}
コード例 #2
0
ファイル: unxFile.cpp プロジェクト: bngabonziza/miktex
PathName
Directory::GetCurrentDirectory ()
{
  PathName cd;
  cd.SetToCurrentDirectory ();
  return (cd);
}