Definition at line 140 of file mainIDo.cpp. References Impala::FileExists(), Impala::FileReadString(), HandleCmd(), ILOG_ERROR, ILOG_INFO, Impala::StringResolveEnv(), and Impala::StringStartsWith(). Referenced by Go(). 00141 { 00142 String path; 00143 if (FileExists(fileName)) 00144 { 00145 path = fileName; 00146 } 00147 else 00148 { 00149 String s = 00150 StringResolveEnv("${IMPALAROOT}/src/script/ido/" + fileName); 00151 if (FileExists(s)) 00152 path = s; 00153 } 00154 if (path.empty()) 00155 { 00156 ILOG_ERROR("Unable to find file " << fileName); 00157 return; 00158 } 00159 std::vector<String> lines; 00160 FileReadString(std::back_inserter(lines), path); 00161 for (int i=0 ; i<lines.size() ; i++) 00162 { 00163 if (StringStartsWith(lines[i], "exit")) 00164 { 00165 ILOG_INFO("HandleCmd: doing exit"); 00166 break; 00167 } 00168 HandleCmd(lines[i]); 00169 } 00170 }
Here is the call graph for this function: ![]()
|