Lines Matching refs:path
134 bool Parser::ParseConfigFileInsecure(const std::string& path, bool follow_symlinks = false) { in ParseConfigFileInsecure() argument
136 if (!android::base::ReadFileToString(path, &config_contents, follow_symlinks)) { in ParseConfigFileInsecure()
140 ParseData(path, &config_contents); in ParseConfigFileInsecure()
144 Result<void> Parser::ParseConfigFile(const std::string& path) { in ParseConfigFile() argument
145 LOG(INFO) << "Parsing file " << path << "..."; in ParseConfigFile()
147 auto config_contents = ReadFile(path); in ParseConfigFile()
149 return Error() << "Unable to read config file '" << path in ParseConfigFile()
153 ParseData(path, &config_contents.value()); in ParseConfigFile()
155 LOG(VERBOSE) << "(Parsing " << path << " took " << t << ".)"; in ParseConfigFile()
159 bool Parser::ParseConfigDir(const std::string& path) { in ParseConfigDir() argument
160 LOG(INFO) << "Parsing directory " << path << "..."; in ParseConfigDir()
161 std::unique_ptr<DIR, decltype(&closedir)> config_dir(opendir(path.c_str()), closedir); in ParseConfigDir()
163 PLOG(INFO) << "Could not import directory '" << path << "'"; in ParseConfigDir()
172 android::base::StringPrintf("%s/%s", path.c_str(), current_file->d_name); in ParseConfigDir()
186 bool Parser::ParseConfig(const std::string& path) { in ParseConfig() argument
187 if (is_dir(path.c_str())) { in ParseConfig()
188 return ParseConfigDir(path); in ParseConfig()
190 auto result = ParseConfigFile(path); in ParseConfig()