Classes | |
| struct | Anp::Finder::File |
Functions | |
| bool | operator== (const std::string &lhs, const File &rhs) |
| bool | operator== (const File &lhs, const std::string &rhs) |
| bool | operator< (const File &lhs, const File &rhs) |
| double | file_size (const std::string &path) |
| const std::vector< std::string > | read_file (const std::string &file) |
|
|
Definition at line 36 of file RunFinder.cxx. Referenced by Anp::RunFinder::Add(), Anp::RunFinder::AddDir(), and Anp::RunFinder::GetFileSize(). 00037 {
00038 //
00039 // Return file size in megabytes
00040 //
00041 struct stat result;
00042 if(stat(path.c_str(), &result) != 0)
00043 {
00044 return 0.0;
00045 }
00046
00047 return double(result.st_size)/1038336.0;
00048 }
|
|
||||||||||||
|
Definition at line 30 of file RunFinder.cxx. References Anp::Finder::File::name. 00031 {
00032 return (lhs.name < rhs.name);
00033 }
|
|
||||||||||||
|
Definition at line 24 of file RunFinder.cxx. References Anp::Finder::File::name. 00025 {
00026 return (lhs.name == rhs);
00027 }
|
|
||||||||||||
|
Definition at line 18 of file RunFinder.cxx. References Anp::Finder::File::name. 00019 {
00020 return (lhs == rhs.name);
00021 }
|
|
|
Definition at line 51 of file RunFinder.cxx. References infile. Referenced by Anp::RunFinder::Add(), and Anp::RunFinder::AddIndex(). 00052 {
00053 std::vector<std::string> svec;
00054
00055 std::ifstream infile(file.c_str());
00056 if(!infile || !infile.is_open())
00057 {
00058 std::cout << "Error! Cannot open file:" << file << std::endl;
00059 return svec;
00060 }
00061
00062 while(infile.good())
00063 {
00064 std::string instr;
00065 std::getline(infile, instr);
00066
00067 if(instr.size() < 6)
00068 {
00069 continue;
00070 }
00071
00072 svec.push_back(instr);
00073 }
00074
00075 infile.close();
00076
00077 return svec;
00078 }
|
1.3.9.1