X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flastfiles.C;h=537d611c619938840edd0850f16e007064b24efb;hb=2bb86211292f416cd584023feb23dc3b86bc1761;hp=477b13f8c6e001ab7944a5b8c7ebbe058e36ef71;hpb=7ea7dabed1b72cc25dcbdc482ac006f2b61dacfd;p=lyx.git diff --git a/src/lastfiles.C b/src/lastfiles.C index 477b13f8c6..537d611c61 100644 --- a/src/lastfiles.C +++ b/src/lastfiles.C @@ -1,36 +1,33 @@ -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2001 The LyX Team. +/** + * \file lastfiles.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * ====================================================== */ + * \author Lars Gullik Bjønnes + * + * Full author contact details are available in file CREDITS. + */ #include - -#ifdef __GNUG__ -#pragma implementation -#endif - #include "lastfiles.h" #include "debug.h" -#include "support/FileInfo.h" +#include -#include #include +#include #include +namespace fs = boost::filesystem; -using std::ifstream; -using std::ofstream; -using std::getline; +using std::copy; using std::endl; using std::find; -using std::copy; +using std::getline; +using std::string; +using std::ifstream; +using std::ofstream; using std::ostream_iterator; @@ -61,14 +58,10 @@ void LastFiles::readFile(string const & filename) // we issue a warning. (Lgb) ifstream ifs(filename.c_str()); string tmp; - FileInfo fileInfo; while (getline(ifs, tmp) && files.size() < num_files) { - if (dostat) { - if (!(fileInfo.newFile(tmp).exist() && - fileInfo.isRegular())) + if (dostat && !fs::exists(tmp)) continue; - } files.push_back(tmp); } }