Lines Matching refs:content
217 bool ReadFdToString(borrowed_fd fd, std::string* content) { in ReadFdToString() argument
218 content->clear(); in ReadFdToString()
225 content->reserve(sb.st_size); in ReadFdToString()
231 content->append(buf, n); in ReadFdToString()
236 bool ReadFileToString(const std::string& path, std::string* content, bool follow_symlinks) { in ReadFileToString() argument
237 content->clear(); in ReadFileToString()
244 return ReadFdToString(fd, content); in ReadFileToString()
247 bool WriteStringToFd(const std::string& content, borrowed_fd fd) { in WriteStringToFd() argument
248 const char* p = content.data(); in WriteStringToFd()
249 size_t left = content.size(); in WriteStringToFd()
270 bool WriteStringToFile(const std::string& content, const std::string& path, in WriteStringToFile() argument
291 if (!WriteStringToFd(content, fd)) { in WriteStringToFile()
299 bool WriteStringToFile(const std::string& content, const std::string& path, in WriteStringToFile() argument
307 return WriteStringToFd(content, fd) || CleanUpAfterFailedWrite(path); in WriteStringToFile()