Home
last modified time | relevance | path

Searched refs:file_contents (Results 1 – 10 of 10) sorted by relevance

/system/core/init/
Dutil_test.cpp34 auto file_contents = ReadFile("/proc/does-not-exist"); in TEST() local
36 ASSERT_FALSE(file_contents); in TEST()
37 EXPECT_EQ("open() failed: No such file or directory", file_contents.error_string()); in TEST()
46 auto file_contents = ReadFile(tf.path); in TEST() local
47 ASSERT_FALSE(file_contents) << strerror(errno); in TEST()
48 EXPECT_EQ("Skipping insecure file", file_contents.error_string()); in TEST()
57 auto file_contents = ReadFile(tf.path); in TEST() local
58 ASSERT_FALSE(file_contents) << strerror(errno); in TEST()
59 EXPECT_EQ("Skipping insecure file", file_contents.error_string()); in TEST()
65 auto file_contents = ReadFile("/charger"); in TEST() local
[all …]
Dpersistent_properties.cpp150 auto file_contents = ReadFile(persistent_property_filename); in ReadPersistentPropertyFile() local
151 if (!file_contents) { in ReadPersistentPropertyFile()
152 return Error() << "Unable to read persistent property file: " << file_contents.error(); in ReadPersistentPropertyFile()
154 return *file_contents; in ReadPersistentPropertyFile()
160 auto file_contents = ReadPersistentPropertyFile(); in LoadPersistentPropertyFile() local
161 if (!file_contents) return file_contents.error(); in LoadPersistentPropertyFile()
164 if (persistent_properties.ParseFromString(*file_contents)) return persistent_properties; in LoadPersistentPropertyFile()
Dproperty_service.cpp702 auto file_contents = ReadFile(filename); in load_properties_from_file() local
703 if (!file_contents) { in load_properties_from_file()
705 << "': " << file_contents.error(); in load_properties_from_file()
708 file_contents->push_back('\n'); in load_properties_from_file()
710 LoadProperties(file_contents->data(), filter, filename, properties); in load_properties_from_file()
936 auto file_contents = std::string(); in LoadPropertyInfoFromFile() local
937 if (!ReadFileToString(filename, &file_contents)) { in LoadPropertyInfoFromFile()
943 ParsePropertyInfoFile(file_contents, property_infos, &errors); in LoadPropertyInfoFromFile()
Dbuiltins.cpp926 auto file_contents = ReadFile(args[1]); in do_copy() local
927 if (!file_contents) { in do_copy()
928 … return Error() << "Could not read input file '" << args[1] << "': " << file_contents.error(); in do_copy()
930 if (auto result = WriteFile(args[2], *file_contents); !result) { in do_copy()
/system/core/property_service/libpropertyinfoserializer/
Dproperty_info_file.cpp96 void ParsePropertyInfoFile(const std::string& file_contents, in ParsePropertyInfoFile() argument
103 for (const auto& line : Split(file_contents, "\n")) { in ParsePropertyInfoFile()
/system/core/property_service/property_info_checker/
Dproperty_info_checker.cpp149 auto file_contents = std::string{}; in main()
150 if (!ReadFileToString(filename, &file_contents)) { in main()
156 ParsePropertyInfoFile(file_contents, &property_info_entries, &errors); in main()
/system/core/property_service/libpropertyinfoserializer/include/property_info_serializer/
Dproperty_info_serializer.h44 void ParsePropertyInfoFile(const std::string& file_contents,
/system/tools/sysprop/
DCommon.cpp299 std::string file_contents; in ParseProps() local
301 if (!android::base::ReadFileToString(input_file_path, &file_contents, true)) { in ParseProps()
306 if (!google::protobuf::TextFormat::ParseFromString(file_contents, props)) { in ParseProps()
/system/tools/aidl/
Dgenerate_cpp_unittest.cpp1373 ASTTest(const string& cmdline, const string& file_contents) in ASTTest() argument
1374 : options_(Options::From(cmdline)), file_contents_(file_contents) { in ASTTest()
/system/core/libziparchive/
Dzip_archive_test.cc349 std::vector<uint8_t> file_contents(kAbUncompressedSize); in TEST() local
351 …ASSERT_TRUE(android::base::ReadFully(tmp_output_file.fd, &file_contents[0], file_contents.size())); in TEST()
352 ASSERT_EQ(file_contents, buffer); in TEST()
355 const uint8_t* line = &file_contents[0] + (3 * i); in TEST()