| 97 | // ---------------------------------------------------------------------------------------- |
| 98 | |
| 99 | std::string select_oldest_file ( |
| 100 | const std::string& filename1, |
| 101 | const std::string& filename2 |
| 102 | ) |
| 103 | { |
| 104 | file f1, f2; |
| 105 | try{f1 = file(filename1);} catch(file::file_not_found&) { return filename1; } |
| 106 | try{f2 = file(filename2);} catch(file::file_not_found&) { return filename2; } |
| 107 | |
| 108 | if (f1.last_modified() < f2.last_modified()) |
| 109 | return filename1; |
| 110 | else |
| 111 | return filename2; |
| 112 | } |
| 113 | |
| 114 | // ---------------------------------------------------------------------------------------- |
| 115 |
no test coverage detected