Home
last modified time | relevance | path

Searched refs:os (Results 1 – 25 of 41) sorted by relevance

12

/base/startup/init/scripts/
Dparam_cfg_to_code.py20 import os
81 f.write('#ifndef PARAM_LITE_DEF_CFG_' + os.linesep)
82 f.write('#define PARAM_LITE_DEF_CFG_' + os.linesep)
83 f.write('#include <stdint.h>' + os.linesep + os.linesep)
84 f.write('#ifdef __cplusplus' + os.linesep)
85 f.write('#if __cplusplus' + os.linesep)
86 f.write('extern "C" {' + os.linesep)
87 f.write('#endif' + os.linesep)
88 f.write('#endif' + os.linesep + os.linesep)
91 f.write('typedef struct Node_ {' + os.linesep)
[all …]
/base/update/updater/services/ui/strategy/
Dui_strategy.cpp20 std::ostream &operator<<(std::ostream &os, const UiStrategyCfg &info) in operator <<() argument
22 os << "confirmPageId: " << info.confirmPageId << std::endl; in operator <<()
23 os << "labelLogId: { " << info.labelLogId << " }" << std::endl; in operator <<()
24 os << "labelLogResId: { " << info.labelLogResId << " }" << std::endl; in operator <<()
25 os << "labelUpdId: { " << info.labelUpdId << " }" << std::endl; in operator <<()
26 os << info.progressPage << std::endl; in operator <<()
27 os << info.resPage; in operator <<()
28 return os; in operator <<()
31 std::ostream &operator<<(std::ostream &os, const ResPage &info) in operator <<() argument
33 os << "resPage: {" << std::endl; in operator <<()
[all …]
Dui_strategy.h26 std::ostream &operator<<(std::ostream &os, const UiStrategyCfg &info);
27 std::ostream &operator<<(std::ostream &os, const ResPage &info);
28 std::ostream &operator<<(std::ostream &os, const ProgressPage &info);
/base/update/packaging_tools/test/
Dcreate_package_data.py16 import os
91 if not os.path.exists(package_name_path):
92 os.mkdir(package_name_path)
95 create_file(os.path.join(package_name_path, "system.img"),
107 create_file(os.path.join(package_name_path, "vendor.img"),
110 create_file(os.path.join(package_name_path, "updater_binary"),
114 create_file(os.path.join(package_name_path, "uImage"),
116 create_file(os.path.join(package_name_path, "updater.img"),
118 create_file(os.path.join(package_name_path, "updater_b.img"),
120 create_file(os.path.join(package_name_path, "updater_uImage"),
[all …]
Dtest_build_update.py16 import os
53 if not os.path.exists("./output_test"):
54 os.mkdir("./output_test")
65 pkg_re = os.path.join(output, os.listdir(output)[0]).endswith('zip')
79 if not os.path.exists("./output_test"):
80 os.mkdir("./output_test")
92 pkg_re = os.path.join(output, os.listdir(output)[0]).endswith('zip')
106 if not os.path.exists("./output_test"):
107 os.mkdir("./output_test")
119 pkg_re = len(os.listdir(output))
[all …]
Dtest_utils.py15 import os
52 os.makedirs('test_dir')
56 os.remove(target_package)
57 os.rmdir('test_dir')
62 os.makedirs(UPDATER_CONFIG)
69 os.remove(target_package)
70 os.rmdir(UPDATER_CONFIG)
71 os.remove('test.file')
72 self.assertEqual((type(check_re[0]), os.path.exists(check_re[1])),
93 if os.path.exists("./updater_specified_config_repeats.xml"):
[all …]
Dtest_update_package.py16 import os
113 if os.path.exists(VERSION_MBN_PATH):
114 os.remove(VERSION_MBN_PATH)
115 if os.path.exists(BOARD_LIST_PATH):
116 os.remove(BOARD_LIST_PATH)
148 os.remove(package_path)
/base/hiviewdfx/hiview/build/
Drun_oem_hook.py16 import os
23 for relpath, dirs, files in os.walk(path):
25 script_path = os.path.join(path, relpath, "oem_hook.py")
26 return os.path.normpath(os.path.abspath(script_path))
41 hiview_build_path = os.path.split(os.path.realpath(__file__))[0]
42 hiview_path = os.path.realpath(os.path.join(hiview_build_path, ".."))
55 out_dir = os.path.dirname(output_file)
57 if os.path.isdir(out_dir) is False:
58 os.makedirs(out_dir)
Dcopy_plugin_config.py17 import os
22 dest_dir = os.path.dirname(dst)
23 if not os.path.exists(dest_dir):
24 os.makedirs(dest_dir)
Dgen_plugin_build.py18 import os
22 from os.path import join
23 from os.path import realpath
30 if not os.path.exists(input_file):
42 file_dir = os.path.dirname(os.path.abspath(output_file))
43 if not os.path.exists(file_dir):
44 os.makedirs(file_dir, exist_ok=True)
52 build_path = os.path.split(realpath(__file__))[0]
59 if not os.path.exists(gn_path):
83 out_dir = os.path.dirname(output_file)
[all …]
/base/startup/init/services/etc/param/
Dparam_fixer.py17 import os
22 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
23 os.pardir, os.pardir, os.pardir, os.pardir, "build"))
70 flags = os.O_WRONLY | os.O_CREAT | os.O_TRUNC
72 with os.fdopen(os.open(options.output, flags, modes), 'w') as f:
/base/startup/init/services/etc/appender/
Dfile_appender.py17 import os
56 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
57 os.pardir, os.pardir, os.pardir, os.pardir, "build"))
67 …with os.fdopen(os.open(options.output, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR), 'w') …
/base/update/packaging_tools/
Dbuild_pkcs7.py18 import os
32 operation_path = os.path.dirname(os.path.realpath(__file__))
33 CERT_PATH = os.path.join(operation_path, 'sign_cert/signing_cert.crt')
63 remain_len = os.path.getsize(package_path) - ZIP_ECOD_LENGTH
136 package_fd = os.open(signed_package, os.O_RDWR | os.O_CREAT, 0o755)
137 f_signed = os.fdopen(package_fd, 'wb')
139 remain_len = os.path.getsize(unsigned_package) - 2
163 digest_fd = os.open("digest", os.O_RDWR | os.O_CREAT, 0o755)
164 digest_file = os.fdopen(digest_fd, 'wb')
168 signatute_fd = os.open("signature", os.O_RDWR | os.O_CREAT, 0o755)
[all …]
Dutils.py21 import os
33 operation_path = os.path.dirname(os.path.realpath(__file__))
45 SO_PATH = os.path.join(operation_path, 'lib/libpackage.so')
46 SO_PATH_L1 = os.path.join(operation_path, 'lib/libpackageL1.so')
47 DIFF_EXE_PATH = os.path.join(operation_path, 'lib/diff')
48 E2FSDROID_PATH = os.path.join(operation_path, 'lib/e2fsdroid')
224 os.mkdir(os.path.join(tmp_dir, name))
226 ext_filename = os.path.join(
235 tmp_dir_list = os.listdir(tmp_dir)
237 unzip_dir = os.path.join(tmp_dir, tmp_dir_list[0])
[all …]
Dunpack_updater_package.py19 import os
76 if not os.access(OPTIONS_MANAGER.unpack_package_path, os.R_OK) and \
137 image_file_path = os.path.join(self.save_path, component_name)
145 image_fd = os.open(image_file_path, os.O_RDWR | os.O_CREAT, 0o755)
146 with os.fdopen(image_fd, "wb") as image_file:
165 self.save_path = os.path.join(OPTIONS_MANAGER.target_package, filename)
166 os.makedirs(self.save_path)
Dbuild_update.py48 import os
95 if arg is not None and not os.path.exists(arg):
109 if arg != "ON_SERVER" and not os.path.isfile(arg):
124 if os.path.exists(arg):
125 if os.path.isfile(arg):
135 os.makedirs(arg)
155 unpack_package = os.path.join(OPTIONS_MANAGER.update_package, arg)
156 if not os.path.isfile(unpack_package):
279 if os.path.isdir(source_package):
339 xml_path = os.path.join(OPTIONS_MANAGER.source_package_dir,
[all …]
Dupdate_package.py18 import os
206 component_list[idx].size = os.path.getsize(file_path)
209 component_list[idx].original_size = os.path.getsize(file_path)
350 update_exe_path = os.path.join(OPTIONS_MANAGER.target_package_dir,
352 if not os.path.exists(update_exe_path):
410 update_package_path = os.path.join(
432 signed_package = os.path.join(
435 if os.path.exists(signed_package):
436 os.remove(signed_package)
448 if os.path.exists(update_package_path):
[all …]
/base/security/selinux/scripts/
Dbuild_policy.py20 import os
62 for root, dirs, _ in os.walk(search_dir):
65 folder_list.append(os.path.join(root, dir_i))
71 for root, _, files in os.walk(search_dir):
74 policy_file_list.append(os.path.join(root, each_file))
107 check_policy_cmd = [os.path.join(args.tool_path, "checkpolicy"),
115 build_policy_cmd = [os.path.join(args.tool_path, "secilc"),
131 path = os.path.join(root_dir, i)
132 if (os.path.exists(path)):
140 output_path = os.path.abspath(os.path.dirname(args.dst_file))
[all …]
Dbuild_contexts.py20 import os
60 for root, _, files in os.walk(item):
62 file_name = os.path.basename(each_file)
64 policy_file_list.append(os.path.join(root, each_file))
132 check_cmd = [os.path.join(args.tool_path, "sefcontext_compile"),
137 if os.path.exists(contexts_file + ".bin"):
138 os.unlink(contexts_file + ".bin")
190 check_cmd = [os.path.join(args.tool_path, "sefcontext_compile"),
199 if os.path.exists(contexts_file + ".bin"):
200 os.unlink(contexts_file + ".bin")
[all …]
/base/update/updater/services/script/
Dgenerate_yacc.py17 import os
29 parser_file = os.path.join(yacc_path, "parser.cpp")
30 lexer_file = os.path.join(yacc_path, "lexer.cpp")
31 flexlexer_file = os.path.join(yacc_path, "FlexLexer.h")
32 if not os.path.exists(yacc_path):
33 os.makedirs(yacc_path)
/base/security/device_security_level/oem_property/ohos/
Ddslm_cred_tool.py23 import os
38 file.write(str(message) + os.linesep)
98 if self.exe is None or not os.path.exists(self.exe):
100 store_dir = os.path.join(os.getcwd(), store_dir)
101 if not os.path.exists(store_dir):
102 os.makedirs(store_dir, 0o700)
106 sk_file = os.path.join(self.store_dir, '{}.key.pem'.format(key_alias))
107 pk_file = os.path.join(self.store_dir, '{}.pub.pem'.format(key_alias))
110 if not os.path.isfile(sk_file):
115 if not os.path.isfile(pk_file):
[all …]
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/python/ohos/global/i18n/
Dgenerate_dat.py20 import os
51 file_name_list = os.listdir(path)
65 with open(os.path.join(path, locales_file_name), 'r', encoding='utf-8') as locale_file:
71 with open(os.path.join(path, resource_item_file_name), 'r', encoding='utf-8') as resource_file:
78 with open(os.path.join(path, resource_name), 'r', encoding='utf-8') as item_file:
190 flags = os.O_WRONLY
192 with os.fdopen(os.open(dat_save_path, flags, modes), 'wb') as dat_file:
197 current_file_path = os.path.abspath(__file__)
198 …resource_path = os.path.join(os.path.dirname(current_file_path), "..", "..", "..", "..", "resource…
202 save_path = [os.path.dirname(current_file_path)] + up_path + ["frameworks", "i18n", "i18n.dat"]
[all …]
/base/global/timezone/tool/update_tool/
Ddownload_iana.py25 import os
87 file_path = os.path.abspath(__file__)
88 file_dir = os.path.dirname(file_path)
96 if not os.path.exists(download_path):
97 os.makedirs(download_path)
107 with open(os.path.join(download_path, 'version.txt'), 'w') as file:
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/
Dfile_util.cpp153 std::ofstream os; in SaveStringToFile() local
155 os.open(file.c_str(), std::ios::out | std::ios::trunc); in SaveStringToFile()
157 os.open(file.c_str(), std::ios::out | std::ios::app); in SaveStringToFile()
159 if (!os.is_open()) { in SaveStringToFile()
163 os.write(content.c_str(), content.length()); in SaveStringToFile()
164 if (os.fail()) { in SaveStringToFile()
165 os.close(); in SaveStringToFile()
168 os.close(); in SaveStringToFile()
/base/update/updater/services/ui/
Dupdater_ui_config.cpp45 std::ostream &operator<<(std::ostream &os, const UxViewCommonInfo &info) in operator <<() argument
47 os << "x=" << info.x << ", y=" << info.y << ", w=" << info.w << ", h=" << info.h << ", id="; in operator <<()
48 os << info.id << ", type=" << info.type << ", visible=" << info.visible; in operator <<()
49 return os; in operator <<()
52 std::ostream &operator<<(std::ostream &os, const UxPageInfo &info) in operator <<() argument
58 return os; in operator <<()

12