Lines Matching refs:filename

97 std::unique_ptr<config_t> config_new(const char* filename) {  in config_new()  argument
98 CHECK(filename != nullptr); in config_new()
102 FILE* fp = fopen(filename, "rt"); in config_new()
104 LOG(ERROR) << __func__ << ": unable to open file '" << filename in config_new()
117 std::string checksum_read(const char* filename) { in checksum_read() argument
118 base::FilePath path(filename); in checksum_read()
120 LOG(ERROR) << __func__ << ": unable to locate file '" << filename << "'"; in checksum_read()
125 LOG(ERROR) << __func__ << ": unable to read file '" << filename << "'"; in checksum_read()
263 bool config_save(const config_t& config, const std::string& filename) { in config_save() argument
264 CHECK(!filename.empty()); in config_save()
280 const std::string temp_filename = filename + ".new"; in config_save()
283 const std::string directoryname = base::FilePath(filename).DirName().value(); in config_save()
285 LOG(ERROR) << __func__ << ": error extracting directory from '" << filename in config_save()
344 << filename << "': " << strerror(errno); in config_save()
349 if (rename(temp_filename.c_str(), filename.c_str()) == -1) { in config_save()
350 LOG(ERROR) << __func__ << ": unable to commit file '" << filename in config_save()
378 bool checksum_save(const std::string& checksum, const std::string& filename) { in checksum_save() argument
380 CHECK(!filename.empty()) << __func__ << ": filename cannot be empty"; in checksum_save()
396 const std::string temp_filename = filename + ".new"; in checksum_save()
400 const std::string directoryname = base::FilePath(filename).DirName().value(); in checksum_save()
402 LOG(ERROR) << __func__ << ": error extracting directory from '" << filename in checksum_save()
416 LOG(ERROR) << __func__ << ": unable to write file '" << filename.c_str(); in checksum_save()
445 << filename << "': " << strerror(errno); in checksum_save()
450 if (rename(temp_filename.c_str(), filename.c_str()) == -1) { in checksum_save()
451 LOG(ERROR) << __func__ << ": unable to commit file '" << filename in checksum_save()