Home
last modified time | relevance | path

Searched refs:fin (Results 1 – 25 of 26) sorted by relevance

12

/base/hiviewdfx/hiview/adapter/utility/platform/ohos/
Dfile_util.cpp226 std::ifstream fin(src, ios::binary); in CopyFile() local
228 if (!fin.is_open()) { in CopyFile()
234 fout << fin.rdbuf(); in CopyFile()
251 bool GetLastLine(std::istream &fin, std::string &line, uint32_t maxLen) in GetLastLine() argument
253 if (fin.tellg() <= 0) { in GetLastLine()
256 fin.seekg(-1, fin.cur); in GetLastLine()
259 while (fin.good() && fin.peek() == fin.widen('\n') && fin.tellg() > 0 && count < maxLen) { in GetLastLine()
260 fin.seekg(-1, fin.cur); in GetLastLine()
263 if (!fin.good() || count >= maxLen) { in GetLastLine()
266 if (fin.tellg() == 0) { in GetLastLine()
[all …]
/base/hiviewdfx/hiview/adapter/utility/
Dfile_util.cpp274 std::ifstream fin(src); in CopyFile() local
276 if (!fin.is_open()) { in CopyFile()
282 fout << fin.rdbuf(); in CopyFile()
295 bool GetLastLine(std::istream &fin, std::string &line, uint32_t maxLen) in GetLastLine() argument
297 if (fin.tellg() <= 0) { in GetLastLine()
300 fin.seekg(-1, fin.cur); in GetLastLine()
303 while (fin.good() && fin.peek() == fin.widen('\n') && fin.tellg() > 0 && count < maxLen) { in GetLastLine()
304 fin.seekg(-1, fin.cur); in GetLastLine()
307 if (!fin.good() || count >= maxLen) { in GetLastLine()
310 if (fin.tellg() == 0) { in GetLastLine()
[all …]
/base/hiviewdfx/hiview/plugins/eventlogger/log_catcher/
Dbinder_catcher.cpp47 std::ifstream fin; in Catch() local
48 fin.open("/proc/transaction_proc"); in Catch()
49 if (!fin.is_open()) { in Catch()
54 while (getline(fin, line)) { in Catch()
57 fin.close(); in Catch()
Dpeer_binder_catcher.cpp92 std::ifstream& fin, int fd) const in BinderInfoParser() argument
99 while (getline(fin, line)) { in BinderInfoParser()
154 std::ifstream fin; in GetBinderPeerPids() local
156 fin.open(path.c_str()); in GetBinderPeerPids()
157 if (!fin.is_open()) { in GetBinderPeerPids()
164 std::map<int, std::list<PeerBinderCatcher::BinderInfo>> manager = BinderInfoParser(fin, fd); in GetBinderPeerPids()
165 fin.close(); in GetBinderPeerPids()
/base/hiviewdfx/hicollie/frameworks/native/
Dxcollie_utils.cpp51 std::ifstream fin; in GetSelfProcName() local
52 fin.open("/proc/self/comm", std::ifstream::in); in GetSelfProcName()
53 if (!fin.is_open()) { in GetSelfProcName()
58 fin.getline(readStr, READ_SIZE - 1); in GetSelfProcName()
59 fin.close(); in GetSelfProcName()
/base/account/os_account/services/accountmgr/src/
Daccount_helper_data.cpp43 std::ifstream fin(ACCOUNTMGR_HELPER_JSON_FILE); in ParseJsonData() local
44 if (!fin) { in ParseJsonData()
49 jsonData = json::parse(fin, nullptr, false); in ParseJsonData()
52 fin.close(); in ParseJsonData()
55 fin.close(); in ParseJsonData()
Dohos_account_data_deal.cpp62 std::ifstream fin(configFile); in Init() local
63 if (!fin) { in Init()
71 jsonData_ = json::parse(fin, nullptr, false); in Init()
72 fin.close(); in Init()
158 std::ifstream fin(filePath); in ParseJsonFromFile() local
159 if (!fin) { in ParseJsonFromFile()
165 jsonData = json::parse(fin, nullptr, false); in ParseJsonFromFile()
166 fin.close(); in ParseJsonFromFile()
/base/account/os_account/test/systemtest/common/resource/fuzzTest/include/
Dfuzz_config_parser.h43 std::ifstream fin(path); in ParseFromFile4FuzzTest()
44 if (!fin) { in ParseFromFile4FuzzTest()
49 nlohmann::json jsonObj = nlohmann::json::parse(fin, nullptr, false); in ParseFromFile4FuzzTest()
50 fin.close(); in ParseFromFile4FuzzTest()
/base/security/selinux/test/unittest/common/
Dtest_common.cpp113 std::ifstream fin(src, std::ifstream::in || std::ifstream::binary); in CopyFile() local
114 if (!fin) { in CopyFile()
119 fin.close(); in CopyFile()
122 fout << fin.rdbuf(); in CopyFile()
124 fin.close(); in CopyFile()
128 fin.close(); in CopyFile()
/base/update/updater/services/ptable_parse/
Dptable.cpp135 std::ifstream fin(filePath, std::ios::in); in MemReadWithOffset() local
136 if (fin.fail()) { in MemReadWithOffset()
141 fin.seekg(offset, std::ios::beg); in MemReadWithOffset()
142 if (fin.tellg() != static_cast<long long>(offset)) { in MemReadWithOffset()
144 " failed. Now is in 0x" << std::hex << fin.tellg() << std::dec; in MemReadWithOffset()
145 fin.close(); in MemReadWithOffset()
149 if (!fin.read(reinterpret_cast<char *>(outData), dataSize)) { in MemReadWithOffset()
151 " failed. only read 0x" << std::hex << fin.gcount() << std::dec; in MemReadWithOffset()
152 fin.close(); in MemReadWithOffset()
155 fin.close(); in MemReadWithOffset()
[all …]
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/java/ohos/global/i18n/
DPluralFetcher.java54 try (BufferedReader fin = new BufferedReader(new InputStreamReader(new FileInputStream( in init() argument
59 while ((line = fin.readLine()) != null) { in init()
66 try (BufferedReader fin = new BufferedReader(new InputStreamReader(new FileInputStream( in init() argument
71 while ((line = fin.readLine()) != null) { in init()
DMeasureFormatPatternFetcher.java73 try (BufferedReader fin = new BufferedReader(new InputStreamReader(new FileInputStream( in init() argument
77 while ((line = fin.readLine()) != null) { in init()
/base/account/os_account/frameworks/common/file_operator/src/
Daccount_file_operator.cpp152 std::ifstream fin(path); in IsJsonFormat() local
153 if (!fin) { in IsJsonFormat()
157 nlohmann::json jsonData = nlohmann::json::parse(fin, nullptr, false); in IsJsonFormat()
158 fin.close(); in IsJsonFormat()
/base/hiviewdfx/hiview/utility/smart_parser/rule/
Dcompose_rule.cpp32 std::ifstream fin(config, std::ifstream::binary); in ParseComposeRule() local
43 bool ret = parseFromStream(builder, fin, &root, &errs); in ParseComposeRule()
50 if (!reader.parse(fin, root) || !root.isMember(type)) { in ParseComposeRule()
Dextract_rule.cpp31 std::ifstream fin(config, std::ifstream::binary); in ParseExtractRule() local
42 bool ret = parseFromStream(builder, fin, &root, &errs); in ParseExtractRule()
48 if (!reader.parse(fin, root)) { in ParseExtractRule()
/base/hiviewdfx/hidumper/frameworks/native/
Ddump_utils.cpp213 std::ifstream fin(src); in CopyFile() local
215 if ((!fin.is_open()) || (!fout.is_open())) { in CopyFile()
218 fout << fin.rdbuf(); in CopyFile()
/base/hiviewdfx/hiview/plugins/hicollie_collector/
Dplugin.cpp159 std::ifstream fin(log, std::ios::in); in SaveToFile() local
160 if (!fin.is_open()) { in SaveToFile()
164 desText << fin.rdbuf(); in SaveToFile()
165 fin.close(); in SaveToFile()
/base/hiviewdfx/hiview/plugins/eventlogger/log_catcher/include/
Dpeer_binder_catcher.h53 …std::map<int, std::list<PeerBinderCatcher::BinderInfo>> BinderInfoParser(std::ifstream& fin, int f…
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/
Dhiappevent_read.cpp108 ifstream fin(logPersistDir + string(APP_EVENT_DIR) + fileName); in ParseSingFileLogs() local
109 if (!fin) { in ParseSingFileLogs()
115 while (fin >> currentLine) { in ParseSingFileLogs()
/base/hiviewdfx/hisysevent/frameworks/native/
Dhisysevent_json_decorator.cpp50 std::ifstream fin(HISYSEVENT_YAML_DEF_JSON_PATH, std::ifstream::binary); in HiSysEventJsonDecorator() local
55 if (!parseFromStream(jsonRBuilder, fin, &root, &errs)) { in HiSysEventJsonDecorator()
58 if (!reader.parse(fin, root)) { in HiSysEventJsonDecorator()
/base/hiviewdfx/hiview/plugins/eventservice/
Devent_json_parser.cpp119 std::ifstream fin(path, std::ifstream::binary); in EventJsonParser() local
124 if (!parseFromStream(jsonRBuilder, fin, &hiSysEventDef, &errs)) { in EventJsonParser()
127 if (!reader.parse(fin, hiSysEventDef)) { in EventJsonParser()
/base/hiviewdfx/hitrace/test/unittest/hitrace_meter/
Dhitrace_ndk_test.cpp355 ifstream fin(resolvedPath); in ReadFile() local
356 if (!fin.is_open()) { in ReadFile()
360 ss << fin.rdbuf(); in ReadFile()
361 fin.close(); in ReadFile()
/base/hiviewdfx/hitrace/cmd/src/
Dhitrace_cmd.cpp215 ifstream fin(resolvedPath.c_str()); in ReadFile() local
216 if (!fin.is_open()) { in ReadFile()
221 string str((istreambuf_iterator<char>(fin)), istreambuf_iterator<char>()); in ReadFile()
222 fin.close(); in ReadFile()
/base/update/updater/services/
Dupdater_main.cpp435 std::ifstream fin {resultPath}; in PostUpdatePackages() local
436 if (!fin.is_open() || !std::getline(fin, buf)) { in PostUpdatePackages()
/base/update/updater/utils/
Dutils.cpp328 std::ifstream fin(realPath); in CopyFile() local
330 if (!fin.is_open() || !fout.is_open()) { in CopyFile()
334 fout << fin.rdbuf(); in CopyFile()

12