MCPcopy Create free account
hub / github.com/baidu/tera / DfsListDir

Function DfsListDir

src/admincli.cc:787–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785}
786
787int 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
802int DfsGetManifest(const std::string& manifest_path, std::string* start_key, std::string* end_key) {
803 if (manifest_path == "") {

Callers 2

ScanTabletMetaFunction · 0.85
AllDiffFunction · 0.85

Calls 2

StatMethod · 0.45
ListDirectoryMethod · 0.45

Tested by

no test coverage detected