Home
last modified time | relevance | path

Searched refs:FileUtils (Results 1 – 21 of 21) sorted by relevance

/base/hiviewdfx/hidumper/frameworks/native/include/util/
Dfile_utils.h21 class FileUtils : public Singleton<FileUtils> {
23 FileUtils();
24 ~FileUtils();
25 FileUtils(FileUtils const &) = delete;
26 void operator=(FileUtils const &) = delete;
/base/update/updateservice/services/core/ability/utils/src/
Dfile_utils.cpp34 std::map<std::string, int32_t> FileUtils::baseDirMap_;
36 int64_t FileUtils::GetFileSize(const std::string &fileName) in GetFileSize()
47 bool FileUtils::IsFileExist(const std::string &fileName) in IsFileExist()
53 bool FileUtils::IsSpaceEnough(const std::string &filePath, const int64_t requiredSpace) in IsSpaceEnough()
69 bool FileUtils::SaveDataToFile(const std::string &filePath, const std::string &data) in SaveDataToFile()
84 void FileUtils::DeleteFile(const std::string &rootPath, bool isDeleteRootDir) in DeleteFile()
102 void FileUtils::RemoveAll(const std::filesystem::path &path) in RemoveAll()
115 bool FileUtils::CreateMultiDirWithPermission(const std::string &fileDir, int32_t permission) in CreateMultiDirWithPermission()
136 std::string FileUtils::GetParentDir(const std::string &fileDir) in GetParentDir()
143 std::string FileUtils::GetCurrentDir(const std::string &fileDir) in GetCurrentDir()
[all …]
Dsha256_utils.cpp45 if (!FileUtils::IsFileExist(fileName)) { in CheckFileSha256String()
/base/hiviewdfx/hidumper/frameworks/native/src/util/
Dfile_utils.cpp21 FileUtils::FileUtils() in FileUtils() function in OHOS::HiviewDFX::FileUtils
24 FileUtils::~FileUtils() in ~FileUtils()
28 bool FileUtils::CreateFolder(const string &path) in CreateFolder()
51 bool FileUtils::LoadStringFromProcCb(const std::string& path, bool oneLine, bool endWithoutN, const… in LoadStringFromProcCb()
Ddump_cpu_info_util.cpp67 auto& fileInstance = FileUtils::GetInstance(); in GetCurCPUInfo()
115 auto& fileInstance = FileUtils::GetInstance(); in GetCurProcInfo()
187 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(path, false, false, [&](const std::string… in GetCurSpecProcInfo()
/base/update/updateservice/services/firmware/utils/include/
Dfirmware_file_utils.h31 return FileUtils::IsSpaceEnough(Constant::DUPDATE_ENGINE_PACKAGE_ROOT_PATH, requiredSpace); in IsSpaceEnough()
36 FileUtils::DeleteFile(Firmware::PACKAGE_PATH, false); in DeleteDownloadFiles()
/base/update/updateservice/services/startup/manage/src/
Dstartup_manager.cpp61 FileUtils::DestroyBaseDirectory(BASE_DIR_INFOS); in Init()
63 FileUtils::InitAndCreateBaseDirs(BASE_DIR_INFOS); in Init()
Dschedule_config.cpp30 …nlohmann::json::parse(FileUtils::ReadDataFromFile(Constant::DUPDATE_ENGINE_CONFIG_PATH), nullptr, … in InitConfig()
/base/hiviewdfx/hidumper/frameworks/native/src/executor/memory/parse/
Dparse_meminfo.cpp58 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(path, false, true, [&](const string& line… in GetMeminfo()
Dparse_vmallocinfo.cpp52 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(path, false, true, [&](const string& line… in GetVmallocinfo()
Dparse_smaps_info.cpp103 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(path, false, true, [&](const string& line… in GetInfo()
137 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(path, false, true, [&](const string& line… in ShowSmapsData()
Dparse_smaps_rollup_info.cpp82 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(path, false, true, [&](const string& line… in GetMemInfo()
/base/update/updateservice/services/firmware/common/src/
Dfirmware_update_helper.cpp131 if (!FileUtils::IsFileExist(component.spath)) { in IsUpgradePackagesReady()
135 int64_t realSize = FileUtils::GetFileSize(component.spath); in IsUpgradePackagesReady()
/base/update/updateservice/services/core/ability/utils/include/
Dfile_utils.h32 class FileUtils {
/base/update/updateservice/services/engine/src/
Dupdate_service_impl_firmware.cpp157 if (!FileUtils::IsFileExist(changelogFilePath)) { in GetNewVersionDescription()
162 std::string dataXml = FileUtils::ReadDataFromFile(changelogFilePath); in GetNewVersionDescription()
200 if (!FileUtils::IsFileExist(changelogFilePath)) { in GetCurrentVersionDescription()
205 std::string dataXml = FileUtils::ReadDataFromFile(changelogFilePath); in GetCurrentVersionDescription()
/base/hiviewdfx/hidumper/services/native/src/
Ddump_common_utils.cpp179 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(path, true, false, [&](const string& line… in IsUserPid()
221 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(file, false, false, [&](const std::string… in GetLinesInFile()
266 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(filePath, false, false, [&](const string&… in GetProcessNameByPid()
Ddump_manager_cpu_service.cpp344 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(filePath, false, false, [&](const string&… in ReadLoadAvgInfo()
/base/update/updateservice/services/firmware/upgrade/flow/src/
Dfirmware_manager.cpp72 FileUtils::DestroyBaseDirectory(FIRMWARE_DIR_INFOS); in Init()
76 FileUtils::InitAndCreateBaseDirs(FIRMWARE_DIR_INFOS); in Init()
/base/update/updateservice/services/firmware/utils/src/
Dfirmware_check_analyze_utils.cpp150 if (!FileUtils::SaveDataToFile(changelogFilePath, data)) { in AnalyzeComponents()
/base/hiviewdfx/hidumper/test/unittest/common/
Dhidumper_configutils_test.cpp163 auto fileutils = std::make_shared<FileUtils>();
/base/hiviewdfx/hidumper/frameworks/native/src/executor/memory/
Dmemory_info.cpp549 …bool ret = FileUtils::GetInstance().LoadStringFromProcCb(path, true, true, [&](const string& line)… in GetVss()