Home
last modified time | relevance | path

Searched refs:c_str (Results 1 – 25 of 1645) sorted by relevance

12345678910>>...66

/base/startup/init/test/unittest/modules/
Deng_unittest.cpp46 DIR *d = opendir(strPath.c_str()); in RemoveDir()
57 stat(file_name.c_str(), &st); in RemoveDir()
61 remove(file_name.c_str()); in RemoveDir()
67 return rmdir(strPath.c_str()) == 0 ? true : false; in RemoveDir()
76 if (stat(path.c_str(), &st) == 0 && S_ISREG(st.st_mode)) { in IsFileExist()
88 if (stat(path.c_str(), &st) == 0 && S_ISDIR(st.st_mode)) { in IsDirExist()
105 bool isExist = IsDirExist(ENG_ROOT_PATH.c_str());
107 isDel = RemoveDir(ENG_ROOT_PATH.c_str());
110 isExist = IsDirExist(TARGET_PATH.c_str());
112 isDel = RemoveDir(TARGET_PATH.c_str());
[all …]
/base/notification/common_event_service/tools/test/unittest/cem/
Dcommon_event_command_publish_test.cpp100 (char *)toolName_.c_str(),
101 (char *)cmd_.c_str(),
118 (char *)toolName_.c_str(),
119 (char *)cmd_.c_str(),
137 (char *)toolName_.c_str(),
138 (char *)cmd_.c_str(),
156 (char *)toolName_.c_str(),
157 (char *)cmd_.c_str(),
175 (char *)toolName_.c_str(),
176 (char *)cmd_.c_str(),
[all …]
Dcommon_event_command_dump_test.cpp110 (char *)toolName_.c_str(),
111 (char *)cmd_.c_str(),
132 (char *)toolName_.c_str(),
133 (char *)cmd_.c_str(),
154 (char *)toolName_.c_str(),
155 (char *)cmd_.c_str(),
177 (char *)toolName_.c_str(),
178 (char *)cmd_.c_str(),
200 (char *)toolName_.c_str(),
201 (char *)cmd_.c_str(),
[all …]
/base/account/os_account/tools/test/unittest/acm/
Daccount_command_create_test.cpp77 const_cast<char *>(TOOL_NAME.c_str()),
78 const_cast<char *>(cmd_.c_str()),
97 const_cast<char *>(TOOL_NAME.c_str()),
98 const_cast<char *>(cmd_.c_str()),
118 const_cast<char *>(TOOL_NAME.c_str()),
119 const_cast<char *>(cmd_.c_str()),
139 const_cast<char *>(TOOL_NAME.c_str()),
140 const_cast<char *>(cmd_.c_str()),
160 const_cast<char *>(TOOL_NAME.c_str()),
161 const_cast<char *>(cmd_.c_str()),
[all …]
Daccount_command_set_test.cpp74 const_cast<char *>(TOOL_NAME.c_str()),
75 const_cast<char *>(cmd_.c_str()),
93 const_cast<char *>(TOOL_NAME.c_str()),
94 const_cast<char *>(cmd_.c_str()),
113 const_cast<char *>(TOOL_NAME.c_str()),
114 const_cast<char *>(cmd_.c_str()),
133 const_cast<char *>(TOOL_NAME.c_str()),
134 const_cast<char *>(cmd_.c_str()),
153 const_cast<char *>(TOOL_NAME.c_str()),
154 const_cast<char *>(cmd_.c_str()),
[all …]
Daccount_command_delete_test.cpp70 const_cast<char *>(TOOL_NAME.c_str()),
71 const_cast<char *>(cmd_.c_str()),
89 const_cast<char *>(TOOL_NAME.c_str()),
90 const_cast<char *>(cmd_.c_str()),
109 const_cast<char *>(TOOL_NAME.c_str()),
110 const_cast<char *>(cmd_.c_str()),
129 const_cast<char *>(TOOL_NAME.c_str()),
130 const_cast<char *>(cmd_.c_str()),
149 const_cast<char *>(TOOL_NAME.c_str()),
150 const_cast<char *>(cmd_.c_str()),
[all …]
Daccount_command_dump_test.cpp70 const_cast<char *>(TOOL_NAME.c_str()),
71 const_cast<char *>(cmd_.c_str()),
89 const_cast<char *>(TOOL_NAME.c_str()),
90 const_cast<char *>(cmd_.c_str()),
109 const_cast<char *>(TOOL_NAME.c_str()),
110 const_cast<char *>(cmd_.c_str()),
129 const_cast<char *>(TOOL_NAME.c_str()),
130 const_cast<char *>(cmd_.c_str()),
149 const_cast<char *>(TOOL_NAME.c_str()),
150 const_cast<char *>(cmd_.c_str()),
[all …]
Daccount_command_switch_test.cpp70 const_cast<char *>(TOOL_NAME.c_str()),
71 const_cast<char *>(cmd_.c_str()),
89 const_cast<char *>(TOOL_NAME.c_str()),
90 const_cast<char *>(cmd_.c_str()),
109 const_cast<char *>(TOOL_NAME.c_str()),
110 const_cast<char *>(cmd_.c_str()),
129 const_cast<char *>(TOOL_NAME.c_str()),
130 const_cast<char *>(cmd_.c_str()),
149 const_cast<char *>(TOOL_NAME.c_str()),
150 const_cast<char *>(cmd_.c_str()),
[all …]
Daccount_command_test.cpp64 const_cast<char *>(TOOL_NAME.c_str()),
82 const_cast<char *>(TOOL_NAME.c_str()),
101 const_cast<char *>(TOOL_NAME.c_str()),
120 const_cast<char *>(TOOL_NAME.c_str()),
139 const_cast<char *>(TOOL_NAME.c_str()),
159 const_cast<char *>(TOOL_NAME.c_str()),
160 const_cast<char *>(cmd_.c_str()),
178 const_cast<char *>(TOOL_NAME.c_str()),
179 const_cast<char *>(cmd_.c_str()),
198 const_cast<char *>(TOOL_NAME.c_str()),
[all …]
/base/hiviewdfx/faultloggerd/services/
Dfault_logger_config.cpp31 FAULTLOGGER_CONFIG_TAG.c_str(), number, size, path.c_str(), debugPath.c_str()); in FaultLoggerConfig()
41 FAULTLOGGER_CONFIG_TAG.c_str(), logFileNumber_); in GetLogFileMaxNumber()
49 FAULTLOGGER_CONFIG_TAG.c_str(), logFileNumber_); in SetLogFileMaxNumber()
56 FAULTLOGGER_CONFIG_TAG.c_str(), logFileSize_); in GetLogFileMaxSize()
64 FAULTLOGGER_CONFIG_TAG.c_str(), logFileSize_); in SetLogFileMaxSize()
71 FAULTLOGGER_CONFIG_TAG.c_str(), logFilePath_.c_str()); in GetLogFilePath()
79 FAULTLOGGER_CONFIG_TAG.c_str(), logFilePath_.c_str()); in SetLogFilePath()
86 FAULTLOGGER_CONFIG_TAG.c_str(), debugLogFilePath_.c_str()); in GetDebugLogFilePath()
94 FAULTLOGGER_CONFIG_TAG.c_str(), debugLogFilePath_.c_str()); in SetDebugLogFilePath()
/base/notification/distributed_notification_service/tools/test/unittest/dump/
Dnotification_shell_command_dump_test.cpp175 (char *)toolName_.c_str(),
176 (char *)cmd_.c_str(),
195 (char *)toolName_.c_str(),
196 (char *)cmd_.c_str(),
217 (char *)toolName_.c_str(),
218 (char *)cmd_.c_str(),
239 (char *)toolName_.c_str(),
240 (char *)cmd_.c_str(),
260 (char *)toolName_.c_str(),
261 (char *)cmd_.c_str(),
[all …]
/base/security/access_token/services/tokensyncmanager/src/remote/
Dremote_command_executor.cpp46 ConstantCommon::EncryptDevId(targetNodeId).c_str()); in CreateChannel()
59 ConstantCommon::EncryptDevId(targetNodeId_).c_str()); in ProcessOneCommand()
64 ConstantCommon::EncryptDevId(targetNodeId_).c_str(), uniqueId.c_str()); in ProcessOneCommand()
71 "prepare failure code %{public}d", ConstantCommon::EncryptDevId(targetNodeId_).c_str(), in ProcessOneCommand()
72 uniqueId.c_str(), status); in ProcessOneCommand()
85 ConstantCommon::EncryptDevId(targetNodeId_).c_str()); in ProcessOneCommand()
90 ConstantCommon::EncryptDevId(targetNodeId_).c_str()); in ProcessOneCommand()
104 ConstantCommon::EncryptDevId(targetNodeId_).c_str()); in AddCommand()
110 ConstantCommon::EncryptDevId(targetNodeId_).c_str(), uniqueId.c_str()); in AddCommand()
119 ConstantCommon::EncryptDevId(targetNodeId_).c_str(), in AddCommand()
[all …]
/base/web/webview/test/unittest/nweb_url_resource_response_test/
Dnweb_url_resource_response_test.cpp64 EXPECT_STREQ(input_stream.c_str(), actual_stream.c_str());
67 EXPECT_STREQ(encoding.c_str(), actual_encoding.c_str());
70 EXPECT_STREQ(mime_type.c_str(), actual_mimtype.c_str());
79 EXPECT_STREQ(reason_phrase.c_str(), actual_status.c_str());
93 EXPECT_STREQ(input_stream.c_str(), actual_stream.c_str());
96 EXPECT_STREQ(encoding.c_str(), actual_encoding.c_str());
99 EXPECT_STREQ(mime_type.c_str(), actual_mimtype.c_str());
114 EXPECT_STREQ(input_stream.c_str(), actual_stream.c_str());
118 EXPECT_STREQ(encoding.c_str(), actual_encoding.c_str());
122 EXPECT_STREQ(mime_type.c_str(), actual_mimtype.c_str());
[all …]
/base/account/os_account/interfaces/kits/napi/appaccount/src/
Dnapi_app_account_constant.cpp55 SetNamedProperty(env, constants, Constants::OAUTH_ACTION_ADD_ACCOUNT_IMPLICITLY.c_str(), in Init()
57 …SetNamedProperty(env, constants, Constants::OAUTH_ACTION_AUTHENTICATE.c_str(), "ACTION_AUTHENTICAT… in Init()
58 SetNamedProperty(env, constants, Constants::ACTION_CREATE_ACCOUNT_IMPLICITLY.c_str(), in Init()
60 SetNamedProperty(env, constants, Constants::ACTION_AUTH.c_str(), "ACTION_AUTH"); in Init()
61 …SetNamedProperty(env, constants, Constants::ACTION_VERIFY_CREDENTIAL.c_str(), "ACTION_VERIFY_CREDE… in Init()
62 SetNamedProperty(env, constants, Constants::ACTION_SET_AUTHENTICATOR_PROPERTIES.c_str(), in Init()
64 SetNamedProperty(env, constants, Constants::KEY_NAME.c_str(), "KEY_NAME"); in Init()
65 SetNamedProperty(env, constants, Constants::KEY_OWNER.c_str(), "KEY_OWNER"); in Init()
66 SetNamedProperty(env, constants, Constants::KEY_TOKEN.c_str(), "KEY_TOKEN"); in Init()
67 SetNamedProperty(env, constants, Constants::KEY_ACTION.c_str(), "KEY_ACTION"); in Init()
[all …]
/base/security/device_auth/test/unittest/deviceauth/source/
Dcreds_manager_test.cpp100 (void)AddStringToJson(json, FIELD_USER_ID, TEST_SYM_USER_ID.c_str());
101 (void)AddStringToJson(json, FIELD_DEVICE_ID, TEST_SYM_DEVICE_ID.c_str());
102 (void)AddStringToJson(json, FIELD_AUTH_CODE, TEST_SYM_AUTH_CODE.c_str());
125 (void)AddStringToJson(json, FIELD_USER_ID, TEST_SYM_USER_ID.c_str());
130 (void)AddStringToJson(json, FIELD_DEVICE_ID, TEST_SYM_DEVICE_ID.c_str());
134 (void)AddStringToJson(json, FIELD_AUTH_CODE, TEST_SYM_AUTH_CODE.c_str());
151 int32_t ret = tokenManager->generateKeyAlias(nullptr, TEST_SYM_DEVICE_ID.c_str(), &keyAlias);
154 ret = tokenManager->generateKeyAlias(TEST_SYM_USER_ID.c_str(), nullptr, &keyAlias);
157 …ret = tokenManager->generateKeyAlias(TEST_SYM_USER_ID.c_str(), TEST_SYM_DEVICE_ID.c_str(), nullptr…
168 (void)AddStringToJson(json, FIELD_USER_ID, TEST_SYM_USER_ID.c_str());
[all …]
/base/security/dlp_permission_service/services/dlp_permission/sa/adapt/
Dfile_operator.cpp46 … DLP_LOG_INFO(LABEL, "dir not exist, str = %{public}s errCode %{public}d.", str.c_str(), errno); in InputFileByPathAndContent()
51 (void)realpath(str.c_str(), realPath); in InputFileByPathAndContent()
54 …FO(LABEL, "path need to be canonical, str %{public}s realPath %{public}s.", str.c_str(), realPath); in InputFileByPathAndContent()
58 FILE* fp = fopen(path.c_str(), "wb"); in InputFileByPathAndContent()
60 DLP_LOG_INFO(LABEL, "failed to open %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
63 size_t num = fwrite(content.c_str(), sizeof(char), content.length(), fp); in InputFileByPathAndContent()
65 DLP_LOG_INFO(LABEL, "failed to fwrite %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
70 DLP_LOG_INFO(LABEL, "failed to fflush %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
75 DLP_LOG_INFO(LABEL, "failed to fsync %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
82 …G_INFO(LABEL, "failed to change mode for file %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
[all …]
/base/update/updater/test/unittest/mount_test/
Dfstabapi_unittest.cpp58 fstab = ReadFstabFromFile(fstabFile1.c_str(), false);
61 fstab = ReadFstabFromFile(fstabFile2.c_str(), false);
64 fstab = ReadFstabFromFile(fstabFile3.c_str(), false);
67 fstab = ReadFstabFromFile(fstabFile4.c_str(), false);
70 fstab = ReadFstabFromFile(fstabFile5.c_str(), false);
73 fstab = ReadFstabFromFile(fstabFile6.c_str(), false);
82 fstab = ReadFstabFromFile(fstabFile1.c_str(), false);
86 item = FindFstabItemForPath(*fstab, path1.c_str());
91 item = FindFstabItemForPath(*fstab, path2.c_str());
96 item = FindFstabItemForPath(*fstab, path3.c_str());
[all …]
/base/request/request/services/service/rust/src/
Dc_string_wrapper.rs20 c_str: *const c_char, field
26 let c_str = s.as_ptr() as *const c_char; in from() localVariable
28 CStringWrapper { c_str, len } in from()
32 if self.c_str.is_null() || self.len == 0 { in to_string()
33 unsafe { DeleteChar(self.c_str) }; in to_string()
36 let bytes = unsafe { slice::from_raw_parts(self.c_str as *const u8, self.len as usize) }; in to_string()
38 unsafe { DeleteChar(self.c_str) }; in to_string()
/base/customization/enterprise_device_management/test/unittest/src/
Dutils.cpp38 FILE *fp = popen(cmd.c_str(), "r"); in ExecCmdSync()
70 EDM_MANAGE_DATETIME_PERMISSION.c_str(), in SetEdmInitialEnv()
71 EDM_FACTORY_RESET_PERMISSION.c_str(), in SetEdmInitialEnv()
72 EDM_MANAGE_LOCAL_ACCOUNTS_PERMISSION.c_str(), in SetEdmInitialEnv()
73 EDM_MANAGE_SECURE_SETTINGS_PERMISSION.c_str(), in SetEdmInitialEnv()
74 PERMISSION_ENTERPRISE_SUBSCRIBE_MANAGED_EVENT.c_str(), in SetEdmInitialEnv()
75 PERMISSION_MANAGE_ENTERPRISE_DEVICE_ADMIN.c_str(), in SetEdmInitialEnv()
76 PERMISSION_SET_ENTERPRISE_INFO.c_str(), in SetEdmInitialEnv()
77 PERMISSION_ACCESS_CERT_MANAGER_INTERNAL.c_str(), in SetEdmInitialEnv()
78 PERMISSION_ACCESS_CERT_MANAGER.c_str(), in SetEdmInitialEnv()
[all …]
Dent_info_test.cpp64 EXPECT_STREQ((entinfo1->enterpriseName).c_str(), NAME.c_str());
65 EXPECT_STREQ((entinfo1->description).c_str(), DESCRIPTION.c_str());
66 EXPECT_STREQ((entInfoTest->enterpriseName).c_str(), (entinfo1->enterpriseName).c_str());
67 EXPECT_STREQ((entInfoTest->description).c_str(), (entinfo1->description).c_str());
/base/account/os_account/frameworks/common/file_operator/src/
Daccount_file_operator.cpp44 ACCOUNT_LOGE("failed to create %{public}s, errno %{public}d.", path.c_str(), errno); in CreateDir()
50 … ACCOUNT_LOGE("failed to change mode for %{public}s, errno %{public}d.", path.c_str(), errno); in CreateDir()
67 … ACCOUNT_LOGE("DeleteDirOrFile failed, path %{public}s errno %{public}d.", path.c_str(), errno); in DeleteDirOrFile()
81 … ACCOUNT_LOGE("failed to create dir, str = %{public}s errCode %{public}d.", str.c_str(), errCode); in InputFileByPathAndContent()
85 FILE *fp = fopen(path.c_str(), "wb"); in InputFileByPathAndContent()
87 ACCOUNT_LOGE("failed to open %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
90 size_t num = fwrite(content.c_str(), sizeof(char), content.length(), fp); in InputFileByPathAndContent()
92 ACCOUNT_LOGE("failed to fwrite %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
97 ACCOUNT_LOGE("failed to fflush %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
102 ACCOUNT_LOGE("failed to fsync %{public}s, errno %{public}d.", path.c_str(), errno); in InputFileByPathAndContent()
[all …]
/base/startup/init/test/moduletest/
Dservice_control_test.cpp48 int ret = ServiceControl(serviceName.c_str(), STOP);
50 … ret = ServiceWaitForStatus(serviceName.c_str(), SERVICE_STOPPED, WAIT_SERVICE_STATUS_TIMEOUT);
59 int ret = ServiceControl(serviceName.c_str(), START);
61 ret = ServiceWaitForStatus(serviceName.c_str(), SERVICE_STARTED, WAIT_SERVICE_STATUS_TIMEOUT);
71 int ret = ServiceControl(serviceName.c_str(), START);
83 int ret = ServiceControl(serviceName.c_str(), START);
91 int ret = ServiceControl(serviceName.c_str(), STOP);
104 int ret = ServiceControl(serviceName.c_str(), STOP);
116 int ret = ServiceControl(serviceName.c_str(), STOP);
121 ret = StartServiceByTimer(serviceName.c_str(), timeout);
[all …]
/base/hiviewdfx/hidumper/test/unittest/common/
Dhidumper_manager_test.cpp48 printf("create tmp file fail! erro = %s", DumpUtils::ErrnoToMsg(errno).c_str()); in SetUpTestCase()
82 const_cast<char *>(TOOL_NAME.c_str()),
100 const_cast<char *>(TOOL_NAME.c_str()),
118 const_cast<char *>(TOOL_NAME.c_str()),
136 const_cast<char *>(TOOL_NAME.c_str()),
155 const_cast<char *>(TOOL_NAME.c_str()),
174 const_cast<char *>(TOOL_NAME.c_str()),
192 const_cast<char *>(TOOL_NAME.c_str()),
210 const_cast<char *>(TOOL_NAME.c_str()),
229 const_cast<char *>(TOOL_NAME.c_str()),
[all …]
/base/startup/init/test/unittest/lite/
Dcmd_func_test.cpp85 if (mkdir(TEST_DRI.c_str(), mode) != 0) { in SetUpTestCase()
91 FILE *testFile = fopen(TEST_FILE.c_str(), "w+"); in SetUpTestCase()
97 if (fwrite(writeContent.c_str(), writeContent.length(), 1, testFile) != 1) { in SetUpTestCase()
105 if (chmod(TEST_FILE.c_str(), TEST_FILE_MODE) != 0) { in SetUpTestCase()
109 if (chown(TEST_FILE.c_str(), TEST_FILE_UID, TEST_FILE_GID) != 0) { in SetUpTestCase()
118 if (remove(TEST_FILE.c_str()) != 0) { in TearDownTestCase()
121 if (remove(TEST_DRI.c_str()) != 0) { in TearDownTestCase()
214 ParseCmdLine(g_supportedCmds[i].c_str(), &curCmdLine);
242 g_supportedCmds[i].c_str(), curCmdLen);
315 ParseCmdLine(command.c_str(), &curCmdLine);
[all …]
/base/hiviewdfx/hidumper/frameworks/native/src/util/
Dzip_utils.cpp25 srcPath.c_str(), dstFile.c_str()); in ZipFolder()
29 DUMPER_HILOGD(MODULE_COMMON, "debug|srcFolder=[%{public}s]", srcFolder.c_str()); in ZipFolder()
32 DUMPER_HILOGD(MODULE_COMMON, "leave|ret=false, srcFolder=[%{public}s]", srcFolder.c_str()); in ZipFolder()
36 DUMPER_HILOGD(MODULE_COMMON, "debug|GetDirFiles, srcFolder=[%{public}s]", srcFolder.c_str()); in ZipFolder()
47 DUMPER_HILOGD(MODULE_COMMON, "debug|str=[%{public}s]", str.c_str()); in ZipFolder()
60 zipItem.first.c_str(), zipItem.second.c_str()); in ZipFolder()
63 DUMPER_HILOGD(MODULE_COMMON, "debug|Create, dstFile=[%{public}s]", dstFile.c_str()); in ZipFolder()

12345678910>>...66