Lines Matching refs:os
18 import os
22 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
40 return os.path.exists(os.path.join(current_dir, '.gn'))
45 if os.path.isfile(license_file_path):
46 license_dir = os.path.dirname(license_file_path)
47 license_file = os.path.basename(license_file_path)
49 license_path = os.path.join(license_dir, file)
50 if os.path.isfile(license_path) and file != license_file and \
53 elif os.path.isdir(license_file_path):
55 license_file = os.path.join(license_file_path, file)
56 if os.path.isfile(license_file):
65 candidate = os.path.join(current_dir, file)
66 if os.path.isfile(candidate):
68 return find_file_recursively(os.path.dirname(current_dir), target_files)
98 return os.path.join(os.path.dirname(readme_path), notice_file), notice_name, notice_version
118 return [os.path.join(os.path.dirname(readme_path), file) for file in notice_files], \
146 opensource_file = find_opensource(os.path.abspath(options.module_source_dir))
147 if opensource_file is not None and os.path.exists(opensource_file):
156 readme_path = os.path.join(options.module_source_dir,
158 if not os.path.exists(readme_path):
159 readme_path = find_opensource(os.path.abspath(options.module_source_dir))
172 opensource_file = find_opensource(os.path.abspath(options.module_source_dir))
173 if opensource_file is not None and os.path.exists(opensource_file):
189 os.makedirs(os.path.dirname(output), exist_ok=True)
190 os.makedirs(os.path.dirname(notice_info_json), exist_ok=True)
199 if not os.path.exists(notice_file):
200 notice_file = os.path.join(options.module_source_dir, notice_file)
201 if os.path.exists(notice_file):
202 if not os.path.exists(output):
213 with os.fdopen(os.open(notice_file, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
216 with os.fdopen(os.open(output, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
220 with os.fdopen(os.open(output, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
254 extend_output = os.path.join(options.sdk_notice_dir, install_dir,
255 '{}.{}'.format(os.path.basename(src), 'txt'))