Lines Matching refs:os
20 import os
42 FLAGS = os.O_WRONLY | os.O_CREAT | os.O_EXCL
45 CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
46 SOURCE_ROOT_DIR = os.path.dirname(
47 os.path.dirname(
48 os.path.dirname(os.path.dirname(CURRENT_DIR))
51 SOURCE_OUT_DIR = os.path.join(SOURCE_ROOT_DIR, "out")
53 TDD_BUILD_GN_PATH = os.path.join(
94 project_yaml_path = os.path.join(
99 if not os.path.exists(project_yaml_path):
123 project_dir_path = os.path.join(args.project_path, args.project_name)
126 os.mkdir(project_dir_path)
135 file_path = os.path.join(project_dir_path, 'project.xml')
136 if os.path.exists(file_path):
137 os.remove(file_path)
138 with os.fdopen(os.open(file_path, FLAGS, MODES), 'w') as filehandle:
141 file_path = os.path.join(project_dir_path, "%s.cpp" % args.project_name)
142 if os.path.exists(file_path):
143 os.remove(file_path)
144 with os.fdopen(os.open(file_path, FLAGS, MODES), 'w') as filehandle:
147 file_path = os.path.join(project_dir_path, "%s.h" % args.project_name)
148 if os.path.exists(file_path):
149 os.remove(file_path)
150 with os.fdopen(os.open(file_path, FLAGS, MODES), 'w') as filehandle:
152 file_path = os.path.join(project_dir_path, "BUILD.gn")
153 if os.path.exists(file_path):
154 os.remove(file_path)
155 with os.fdopen(os.open(file_path, FLAGS, MODES), 'w') as filehandle:
158 corpus_dir = os.path.join(project_dir_path, 'corpus')
159 if not os.path.exists(corpus_dir):
160 os.mkdir(corpus_dir)
161 if os.path.exists(os.path.join(corpus_dir, 'init')):
162 os.remove(os.path.join(corpus_dir, 'init'))
163 with os.fdopen(os.open(os.path.join(corpus_dir, 'init'), FLAGS, MODES), 'w') as filehandle:
197 subsystem_src_flag_file_path = os.path.join(
201 if not os.path.exists(os.path.dirname(subsystem_src_flag_file_path)):
202 os.makedirs(os.path.dirname(subsystem_src_flag_file_path))
203 if os.path.exists(subsystem_src_flag_file_path):
204 os.remove(subsystem_src_flag_file_path)
205 with os.fdopen(os.open(subsystem_src_flag_file_path, FLAGS, MODES), 'wb') as file_handle: