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'))
47 candidate = os.path.join(current_dir, file)
48 if os.path.isfile(os.path.join(current_dir, file)):
49 return os.path.join(candidate)
50 return find_license_recursively(os.path.dirname(current_dir))
56 candidate = os.path.join(current_dir, README_FILE_NAME)
57 if os.path.isfile(candidate):
58 return os.path.join(candidate)
59 return find_opensource_recursively(os.path.dirname(current_dir))
80 return os.path.join(os.path.dirname(readme_path), notice_file), notice_name, notice_version
88 opensource_file = find_opensource_recursively(os.path.abspath(options.module_source_dir))
89 if opensource_file is not None and os.path.exists(opensource_file):
97 readme_path = os.path.join(options.module_source_dir,
99 if not os.path.exists(readme_path):
100 readme_path = find_opensource_recursively(os.path.abspath(options.module_source_dir))
110 opensource_file = find_opensource_recursively(os.path.abspath(options.module_source_dir))
111 if opensource_file is not None and os.path.exists(opensource_file):
126 os.makedirs(os.path.dirname(output), exist_ok=True)
127 os.makedirs(os.path.dirname(notice_info_json), exist_ok=True)
136 if not os.path.exists(notice_file):
137 notice_file = os.path.join(options.module_source_dir, notice_file)
138 if os.path.exists(notice_file):
139 if not os.path.exists(output):
150 with os.fdopen(os.open(notice_file, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
153 with os.fdopen(os.open(output, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
157 with os.fdopen(os.open(output, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
191 extend_output = os.path.join(options.sdk_notice_dir, install_dir,
192 '{}.{}'.format(os.path.basename(src), 'txt'))