Home
last modified time | relevance | path

Searched refs:ofs (Results 1 – 8 of 8) sorted by relevance

/base/update/updater/services/ui/
Dupdater_ui_env.cpp115 std::ofstream ofs { brightnessFile }; in InitBrightness() local
116 if (!ofs.is_open()) { in InitBrightness()
123 ofs << (static_cast<std::size_t>(maxValue) >> SHIFT_WIDTH); in InitBrightness()
124 if (ofs.fail() || ofs.bad()) { in InitBrightness()
/base/telephony/core_service/services/sim/src/
Doperator_file_parser.cpp42 std::fstream ofs; in WriteOperatorConfigJson() local
43 ofs.open(GetOperatorConfigFilePath(filename).c_str(), std::ios::ate | std::ios::out); in WriteOperatorConfigJson()
44 if (!ofs.is_open()) { in WriteOperatorConfigJson()
53 ofs << os.str(); in WriteOperatorConfigJson()
54 ofs.close(); in WriteOperatorConfigJson()
/base/time/time_service/services/time/src/
Dntp_update_time.cpp245 std::ofstream ofs; in SaveAutoTimeInfoToFile() local
246 ofs.open(AUTOTIME_FILE_PATH); in SaveAutoTimeInfoToFile()
252 ofs << json_file; in SaveAutoTimeInfoToFile()
253 ofs.close(); in SaveAutoTimeInfoToFile()
/base/update/updater/test/unittest/utils/json/
Dutils_json_test.cpp208 std::ofstream ofs(Fs::path {invalidJsonPath});
209 ofs << invalidContent;
210 ofs.flush();
/base/customization/enterprise_device_management/services/edm/src/
Dadmin_manager.cpp504 std::ofstream ofs(filePath); in WriteJsonAdmin() local
505 if (!ofs.is_open()) { in WriteJsonAdmin()
513 writer->write(root, &ofs); in WriteJsonAdmin()
514 ofs.flush(); in WriteJsonAdmin()
515 ofs.close(); in WriteJsonAdmin()
Dpolicy_manager.cpp182 std::ofstream ofs(EDM_POLICY_JSON_FILE_BAK, std::ofstream::binary); in SavePolicy() local
183 if (!ofs.is_open()) { in SavePolicy()
193 writer->write(policyRoot_, &ofs); in SavePolicy()
195 ofs.flush(); in SavePolicy()
196 ofs.close(); in SavePolicy()
/base/hiviewdfx/hitrace/test/unittest/hitrace_meter/
Dhitrace_ndk_test.cpp336 ofstream ofs; in CleanTrace() local
337 ofs.open(g_traceRootPath + TRACE_PATH, ofstream::out); in CleanTrace()
338 if (!ofs.is_open()) { in CleanTrace()
342 ofs << ""; in CleanTrace()
343 ofs.close(); in CleanTrace()
/base/powermgr/battery_statistics/services/native/src/
Dbattery_stats_core.cpp901 std::ofstream ofs; in SaveBatteryStatsData() local
902 ofs.open(BATTERY_STATS_JSON); in SaveBatteryStatsData()
903 if (!ofs.is_open()) { in SaveBatteryStatsData()
907 swb.newStreamWriter()->write(root, &ofs); in SaveBatteryStatsData()
908 ofs.close(); in SaveBatteryStatsData()