/base/hiviewdfx/hiview/adapter/utility/platform/ohos/ |
D | file_util.cpp | 226 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/ |
D | file_util.cpp | 274 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/ |
D | binder_catcher.cpp | 47 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()
|
D | peer_binder_catcher.cpp | 92 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/ |
D | xcollie_utils.cpp | 51 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/ |
D | account_helper_data.cpp | 43 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()
|
D | ohos_account_data_deal.cpp | 62 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/ |
D | fuzz_config_parser.h | 43 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/ |
D | test_common.cpp | 113 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/ |
D | ptable.cpp | 135 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/ |
D | PluralFetcher.java | 54 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()
|
D | MeasureFormatPatternFetcher.java | 73 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/ |
D | account_file_operator.cpp | 152 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/ |
D | compose_rule.cpp | 32 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()
|
D | extract_rule.cpp | 31 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/ |
D | dump_utils.cpp | 213 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/ |
D | plugin.cpp | 159 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/ |
D | peer_binder_catcher.h | 53 …std::map<int, std::list<PeerBinderCatcher::BinderInfo>> BinderInfoParser(std::ifstream& fin, int f…
|
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/ |
D | hiappevent_read.cpp | 108 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/ |
D | hisysevent_json_decorator.cpp | 50 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/ |
D | event_json_parser.cpp | 119 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/ |
D | hitrace_ndk_test.cpp | 355 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/ |
D | hitrace_cmd.cpp | 215 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/ |
D | updater_main.cpp | 435 std::ifstream fin {resultPath}; in PostUpdatePackages() local 436 if (!fin.is_open() || !std::getline(fin, buf)) { in PostUpdatePackages()
|
/base/update/updater/utils/ |
D | utils.cpp | 328 std::ifstream fin(realPath); in CopyFile() local 330 if (!fin.is_open() || !fout.is_open()) { in CopyFile() 334 fout << fin.rdbuf(); in CopyFile()
|