Home
last modified time | relevance | path

Searched refs:file (Results 1 - 25 of 313) sorted by relevance

12345678910>>...13

/base/startup/init/services/init/
H A Dinit_service_file.c4 * you may not use this file except in compliance with the License.
33 static int CreateFile(ServiceFile *file) in CreateFile() argument
35 INIT_CHECK(file != NULL && file->fileName != NULL, return -1); in CreateFile()
37 if (realpath(file->fileName, path) == NULL) { in CreateFile()
39 INIT_ERROR_CHECK(strncpy_s(path, strlen(file->fileName) + 1, file->fileName, strlen(file->fileName)) >= 0, in CreateFile()
42 INIT_LOGV("File path =%s . file flags =%d, file per in CreateFile()
[all...]
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/
H A Dfile_util.cpp4 * you may not use this file except in compliance with the License.
32 bool IsFileExists(const std::string& file) in IsFileExists() argument
34 return access(file.c_str(), F_OK) == 0; in IsFileExists()
37 bool IsFile(const std::string& file) in IsFile() argument
40 return lstat(file.c_str(), &statBuf) == 0 ? S_ISREG(statBuf.st_mode) : false; in IsFile()
49 bool RemoveFile(const std::string& file) in RemoveFile() argument
51 return !IsFileExists(file) || (remove(file.c_str()) == 0); in RemoveFile()
135 for (auto& file : files) { in GetDirSize()
136 if (stat(file in GetDirSize()
143 GetFileSize(const std::string& file) GetFileSize() argument
149 ChangeMode(const std::string& file, const mode_t& mode) ChangeMode() argument
154 CreateFile(const std::string& file, const mode_t& mode) CreateFile() argument
168 SaveStringToFile(const std::string& file, const std::string& content, bool isTrunc) SaveStringToFile() argument
[all...]
/base/security/security_guard/services/config_manager/src/
H A Dconfig_subscriber.cpp4 * you may not use this file except in compliance with the License.
34 bool ConfigSubscriber::UpdateConfig(const std::string &file) in UpdateConfig() argument
38 if (file == CONFIG_CACHE_FILES[EVENT_CFG_INDEX]) { in UpdateConfig()
40 } else if (file == CONFIG_CACHE_FILES[MODEL_CFG_INDEX]) { in UpdateConfig()
43 event.path = file; in UpdateConfig()
46 SGLOGD("file path=%{public}s, TIME=%{public}s, ret=%{public}d", event.path.c_str(), event.time.c_str(), in UpdateConfig()
50 if (file != CONFIG_CACHE_FILES[EVENT_CFG_INDEX] && file != CONFIG_CACHE_FILES[MODEL_CFG_INDEX]) { in UpdateConfig()
53 if (!RemoveFile(file)) { in UpdateConfig()
54 SGLOGE("remove file erro in UpdateConfig()
[all...]
/base/request/request/services/src/service/command/
H A Ddump.rs3 // you may not use this file except in compliance with the License.
27 // Ignores all the file error.
28 pub(crate) fn dump(&self, mut file: File, args: Vec<String>) -> IpcResult<()> {
33 let _ = file.write(HELP_MSG.as_bytes());
38 let _ = file.write("invalid args".as_bytes());
43 1 => self.dump_all_task_info(file),
47 Ok(id) => self.dump_one_task_info(file, id),
49 let _ = file.write("-t accept a number".as_bytes());
54 let _ = file.write("too many args, -t accept no arg or one arg".as_bytes());
60 fn dump_all_task_info(&self, mut file
[all...]
/base/security/device_auth/deps_adapter/os_adapter/impl/src/liteos/mini/
H A Dhc_file.c4 * you may not use this file except in compliance with the License.
41 int HcFileOpen(const char *path, int mode, FileHandle *file) in HcFileOpen() argument
43 if (path == NULL || file == NULL) { in HcFileOpen()
46 if (strcpy_s(file->filePath, MAX_FILE_PATH_SIZE, path) != EOK) { in HcFileOpen()
51 file->fileHandle.fd = HcFileOpenRead(path); in HcFileOpen()
53 file->fileHandle.fd = HcFileOpenWrite(path); in HcFileOpen()
55 if (file->fileHandle.fd == HAL_FAILED) { in HcFileOpen()
61 int HcFileSize(FileHandle file) in HcFileSize() argument
64 int ret = UtilsFileStat(file.filePath, (unsigned int *)&fileSize); in HcFileSize()
72 int HcFileRead(FileHandle file, voi argument
83 HcFileWrite(FileHandle file, const void *src, int srcSize) HcFileWrite() argument
94 HcFileClose(FileHandle file) HcFileClose() argument
[all...]
H A Dhc_file_posix.c4 * you may not use this file except in compliance with the License.
71 LOGI("[OS]: file open enter."); in HcFileOpenRead()
73 LOGI("[OS]: file open quit."); in HcFileOpenRead()
75 LOGE("[OS]: file open fail. [Errno]: %d", errno); in HcFileOpenRead()
88 LOGI("[OS]: file open enter."); in HcFileOpenWrite()
90 LOGI("[OS]: file open quit."); in HcFileOpenWrite()
92 LOGE("[OS]: file open fail. [Errno]: %d", errno); in HcFileOpenWrite()
97 int HcFileOpen(const char *path, int mode, FileHandle *file) in HcFileOpen() argument
99 if (path == NULL || file == NULL) { in HcFileOpen()
103 file in HcFileOpen()
114 HcFileSize(FileHandle file) HcFileSize() argument
122 HcFileRead(FileHandle file, void *dst, int dstSize) HcFileRead() argument
148 HcFileWrite(FileHandle file, const void *src, int srcSize) HcFileWrite() argument
170 HcFileClose(FileHandle file) HcFileClose() argument
[all...]
/base/account/os_account/frameworks/common/log/src/
H A Daccount_log_wrapper.cpp4 * you may not use this file except in compliance with the License.
28 std::string AccountLogWrapper::GetBriefFileName(const std::string &file) in GetBriefFileName() argument
30 auto pos = file.find_last_of("/"); in GetBriefFileName()
32 return file.substr(pos + 1); in GetBriefFileName()
35 pos = file.find_last_of("\\"); in GetBriefFileName()
37 return file.substr(pos + 1); in GetBriefFileName()
40 return file; in GetBriefFileName()
/base/hiviewdfx/faultloggerd/common/dfxutil/
H A Dfile_util.h4 * you may not use this file except in compliance with the License.
31 std::ifstream file(filePath.c_str()); in LoadStringFromFile()
32 if (!file.is_open()) { in LoadStringFromFile()
36 file.seekg(0, std::ios::end); in LoadStringFromFile()
37 const long fileLength = file.tellg(); in LoadStringFromFile()
43 file.seekg(0, std::ios::beg); in LoadStringFromFile()
44 std::copy(std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>(), std::back_inserter(content)); in LoadStringFromFile()
/base/telephony/telephony_data/common/src/
H A Ddata_storage_log_wrapper.cpp4 * you may not use this file except in compliance with the License.
34 std::string DataStorageLogWrapper::GetBriefFileName(const std::string &file) in GetBriefFileName() argument
36 auto pos = file.find_last_of("/"); in GetBriefFileName()
38 return file.substr(pos + 1); in GetBriefFileName()
41 pos = file.find_last_of("\\"); in GetBriefFileName()
43 return file.substr(pos + 1); in GetBriefFileName()
46 return file; in GetBriefFileName()
/base/account/os_account/frameworks/account_iam/test/unittest/src/
H A Dtest_common.cpp4 * you may not use this file except in compliance with the License.
27 FILE *file = popen(command.c_str(), "r"); in RunCommand() local
29 if (file != nullptr) { in RunCommand()
31 while ((fgets(commandResult, sizeof(commandResult), file)) != nullptr) { in RunCommand()
34 pclose(file); in RunCommand()
35 file = nullptr; in RunCommand()
/base/security/device_auth/deps_adapter/os_adapter/interfaces/liteos/
H A Dhc_file.h4 * you may not use this file except in compliance with the License.
39 int HcFileOpen(const char *path, int mode, FileHandle *file);
40 int HcFileSize(FileHandle file);
41 int HcFileRead(FileHandle file, void *dst, int dstSize);
42 int HcFileWrite(FileHandle file, const void *src, int srcSize);
43 void HcFileClose(FileHandle file);
/base/security/device_auth/deps_adapter/os_adapter/interfaces/linux/
H A Dhc_file.h4 * you may not use this file except in compliance with the License.
35 int HcFileOpen(const char *path, int mode, FileHandle *file);
36 int HcFileSize(FileHandle file);
37 int HcFileRead(FileHandle file, void *dst, int dstSize);
38 int HcFileWrite(FileHandle file, const void *src, int srcSize);
39 void HcFileClose(FileHandle file);
/base/hiviewdfx/hiview/base/event_store/sequence/
H A Dsys_event_sequence_mgr.cpp4 * you may not use this file except in compliance with the License.
33 std::ofstream file; in SaveStringToFile() local
34 file.open(filePath.c_str(), std::ios::in | std::ios::out); in SaveStringToFile()
35 if (!file.is_open()) { in SaveStringToFile()
36 file.open(filePath.c_str(), std::ios::out); in SaveStringToFile()
37 if (!file.is_open()) { in SaveStringToFile()
41 file.seekp(0); in SaveStringToFile()
42 file.write(content.c_str(), content.length() + 1); in SaveStringToFile()
43 bool ret = !file.fail(); in SaveStringToFile()
44 file in SaveStringToFile()
[all...]
/base/powermgr/battery_manager/charger/src/
H A Dbattery_vibrate.cpp4 * you may not use this file except in compliance with the License.
97 FILE* file = fopen(VIBRATOR_PLAYMODE_PATH.c_str(), "w"); in SetPlayMode() local
98 if (file == nullptr) { in SetPlayMode()
102 if (fprintf(file, "%s\n", modeName.c_str()) < 0) { in SetPlayMode()
105 if (fclose(file) < 0) { in SetPlayMode()
113 FILE* file = fopen(VIBRATOR_ACTIVATEMODE_PATH.c_str(), "w"); in ActivateVibration() local
114 if (file == nullptr) { in ActivateVibration()
118 if (fprintf(file, "%d\n", value) < 0) { in ActivateVibration()
121 if (fclose(file) < 0) { in ActivateVibration()
128 FILE* file in SetDuration() local
[all...]
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/include/
H A Dfile_util.h4 * you may not use this file except in compliance with the License.
26 bool IsFileExists(const std::string& file);
27 bool IsFile(const std::string& file);
29 bool RemoveFile(const std::string& file);
35 uint64_t GetFileSize(const std::string& file);
36 bool ChangeMode(const std::string& file, const mode_t& mode);
37 bool CreateFile(const std::string& file, const mode_t& mode);
38 bool SaveStringToFile(const std::string& file, const std::string& content, bool isTrunc = false);
/base/hiviewdfx/hiview/utility/smart_parser/feature_analysis/
H A Dlog_util.cpp4 * you may not use this file except in compliance with the License.
85 bool LogUtil::ReadFileBuff(const string& file, stringstream& buffer) in ReadFileBuff() argument
87 int fd = LogUtil::GetFileFd(file); in ReadFileBuff()
89 HIVIEW_LOGE("%{public}s get fd fail, fd is %{public}d.", file.c_str(), fd); in ReadFileBuff()
95 HIVIEW_LOGE("read file: %s failed, fd is %d\n", file.c_str(), fd); in ReadFileBuff()
104 int LogUtil::GetFileFd(const string& file) in GetFileFd() argument
106 if (file.empty() || !FileUtil::IsLegalPath(file)) { in GetFileFd()
107 HIVIEW_LOGE("the system file ( in GetFileFd()
119 FileExist(const string& file) FileExist() argument
[all...]
/base/hiviewdfx/hiview/core/param_update/src/
H A Dparam_manager.cpp4 * you may not use this file except in compliance with the License.
75 for (const std::string& file : files) { in CopyConfigFiles()
76 std::string dstFile(file); in CopyConfigFiles()
78 if (!CopyFile(file, dstFile)) { in CopyConfigFiles()
79 HIVIEW_LOGI("copy file failed: %{public}s", file.c_str()); in CopyConfigFiles()
89 for (const std::string& file : files) { in GetValidFiles()
90 std::string fileName(FileUtil::ExtractFileName(file)); in GetValidFiles()
94 std::string relativedPath(file.substr(CFG_PATH.length())); in GetValidFiles()
96 HIVIEW_LOGE("verify file faile in GetValidFiles()
[all...]
H A Dparam_reader.cpp4 * you may not use this file except in compliance with the License.
46 std::ifstream file(verifyFile); in VerifyCertFile()
47 if (!file.good()) { in VerifyCertFile()
53 std::getline(file, line); in VerifyCertFile()
54 file.close(); in VerifyCertFile()
69 HIVIEW_LOGE("verify cert file failed"); in VerifyCertFile()
76 std::ifstream file(manifestFile); in VerifyParamFile()
77 if (!file.good()) { in VerifyParamFile()
90 while (std::getline(file, line)) { in VerifyParamFile()
93 std::getline(file, nextlin in VerifyParamFile()
[all...]
/base/security/device_auth/deps_adapter/os_adapter/impl/src/linux/
H A Dhc_file.c4 * you may not use this file except in compliance with the License.
87 int HcFileOpen(const char *path, int mode, FileHandle *file) in HcFileOpen() argument
89 if (path == NULL || file == NULL) { in HcFileOpen()
93 file->pfd = HcFileOpenRead(path); in HcFileOpen()
95 file->pfd = HcFileOpenWrite(path); in HcFileOpen()
97 if (file->pfd == NULL) { in HcFileOpen()
103 int HcFileSize(FileHandle file) in HcFileSize() argument
105 FILE *fp = (FILE *)file.pfd; in HcFileSize()
120 int HcFileRead(FileHandle file, void *dst, int dstSize) in HcFileRead() argument
122 FILE *fp = (FILE *)file in HcFileRead()
144 HcFileWrite(FileHandle file, const void *src, int srcSize) HcFileWrite() argument
175 HcFileClose(FileHandle file) HcFileClose() argument
[all...]
/base/global/resource_management_lite/frameworks/resmgr_lite/src/
H A Dglobal_utils.c4 * you may not use this file except in compliance with the License.
50 static uint32_t GetDefaultOffsetValue(int32_t file);
51 static uint32_t GetKeyValue(int32_t file);
52 static int32_t GetIdItem(int32_t file, uint32_t offset, IdItem *idItem);
54 static int32_t GetKeyParams(int32_t file, Key *keys, uint32_t resConfigNum);
56 static int32_t GetIdHeaderByOffset(int32_t file, uint32_t offset, IdHeader *idHeader);
294 static int32_t GetKeyParams(int32_t file, Key *keys, uint32_t resConfigNum) in GetKeyParams() argument
296 if (file < 0 || keys == NULL) { in GetKeyParams()
301 int seekRet = lseek(file, INDEX_DEFAULT_OFFSET, SEEK_CUR); // skip the "KEYS" header in GetKeyParams()
306 keys[i].offset = GetDefaultOffsetValue(file); in GetKeyParams()
362 int32_t file = open(realResourcePath, O_RDONLY, S_IRUSR | S_IRGRP | S_IROTH); GetOffsetByLocale() local
399 GetDefaultOffsetValue(int32_t file) GetDefaultOffsetValue() argument
412 GetKeyValue(int32_t file) GetKeyValue() argument
425 GetIdItem(int32_t file, uint32_t offset, IdItem *idItem) GetIdItem() argument
496 GetIdHeaderByOffset(int32_t file, uint32_t offset, IdHeader *idHeader) GetIdHeaderByOffset() argument
[all...]
/base/request/request/services/src/task/
H A Ddownload.rs3 // you may not use this file except in compliance with the License.
99 let file = self.files.get_mut(0).unwrap();
100 file.seek(SeekFrom::End(0)).await?;
101 let downloaded = file.metadata().await?.len() as usize;
118 let _trace = Trace::new("download file");
157 let file = task.files.get(0).unwrap();
158 let has_downloaded = file.metadata().await?.len() > 0;
160 error!("task {} file not cleared", task.task_id());
214 "download file tid:{} size:{}",
223 let file
349 let mut file = File::create(file_path).unwrap(); ut_download_resume() variables
430 let mut file = File::create(file_path).unwrap(); ut_download_not_support_range_resume() variables
499 let mut file = File::create(file_path).unwrap(); ut_download_range_resume_0() variables
[all...]
/base/hiviewdfx/hiview/framework/native/unified_collection/graphic_memory/
H A Dfile_helper.cpp4 * you may not use this file except in compliance with the License.
33 std::ifstream file(filePath); in ReadFileByLine()
34 if (!file.is_open()) { in ReadFileByLine()
35 HILOG_ERROR(LOG_CORE, "file[%{public}s] open failed.", filePath.c_str()); in ReadFileByLine()
40 while (std::getline(file, line)) { in ReadFileByLine()
45 file.close(); in ReadFileByLine()
/base/security/appverify/interfaces/innerkits/appverify_lite/src/
H A Dapp_file.c4 * you may not use this file except in compliance with the License.
29 int32_t InitVerify(FileRead *file, const char *filePath, int32_t *handle) in InitVerify() argument
31 if (handle == NULL || file == NULL || filePath == NULL) { in InitVerify()
32 LOG_ERROR("file open error"); in InitVerify()
43 LOG_ERROR("file path error"); in InitVerify()
49 LOG_PRINT_STR("file open error"); in InitVerify()
60 file->len = lseek(*handle, 0, SEEK_END); in InitVerify()
61 file->fp = *handle; in InitVerify()
66 int32_t HapMMap(int32_t bufCapacity, int32_t offset, MmapInfo *mmapInfo, const FileRead *file) in HapMMap() argument
68 if (mmapInfo == NULL || file in HapMMap()
[all...]
/base/hiviewdfx/hisysevent/adapter/native/idl/src/
H A Dfile_util.cpp4 * you may not use this file except in compliance with the License.
30 bool IsFileExists(const std::string& file) in IsFileExists() argument
32 return access(file.c_str(), F_OK) == 0; in IsFileExists()
35 bool IsFile(const std::string& file) in IsFile() argument
38 return lstat(file.c_str(), &statBuf) == 0 ? S_ISREG(statBuf.st_mode) : false; in IsFile()
47 bool RemoveFile(const std::string& file) in RemoveFile() argument
49 return !IsFileExists(file) || (remove(file.c_str()) == 0); in RemoveFile()
/base/theme/wallpaper_mgr/utils/src/
H A Dfile_deal.cpp4 * you may not use this file except in compliance with the License.
65 HILOG_ERROR("Failed to copy file, error code: %{public}d", errCode.value()); in CopyFile()
80 HILOG_ERROR("Failed to remove source file, errInfo=%{public}s.", strerror(errno)); in DeleteFile()
122 HILOG_ERROR("real path file is not exist! %{public}s", outRealPath.c_str()); in GetRealPath()
126 HILOG_ERROR("illegal file path input %{public}s", inOriPath.c_str()); in GetRealPath()
133 fs::path file(filePath); in IsZipFile()
134 if (fs::exists(file) && fs::is_regular_file(file)) { in IsZipFile()
135 std::string extension = file.extension().string(); in IsZipFile()
147 HILOG_ERROR("get real path file faile in ForcedRefreshDisk()
150 FILE *file = std::fopen(fileRealPath.c_str(), "rb"); ForcedRefreshDisk() local
[all...]

Completed in 8 milliseconds

12345678910>>...13