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(); }
PathName Directory::GetCurrentDirectory () { PathName cd; cd.SetToCurrentDirectory (); return (cd); }