| 785 | } |
| 786 | |
| 787 | int DfsListDir(const std::string& dir_name, std::vector<std::string>* paths) { |
| 788 | struct stat fstat; |
| 789 | if (0 == g_dfs->Stat(dir_name.c_str(), &fstat) && !(S_IFDIR & fstat.st_mode)) { |
| 790 | LOG(INFO) << "stat dir:" << dir_name << "fail"; |
| 791 | return 0; |
| 792 | } |
| 793 | |
| 794 | if (0 != g_dfs->ListDirectory(dir_name.c_str(), paths)) { |
| 795 | LOG(INFO) << "list dir:" << dir_name << "fail"; |
| 796 | return -1; |
| 797 | } |
| 798 | |
| 799 | return 0; |
| 800 | } |
| 801 | |
| 802 | int DfsGetManifest(const std::string& manifest_path, std::string* start_key, std::string* end_key) { |
| 803 | if (manifest_path == "") { |
no test coverage detected