Lines Matching refs:file
5 # you may not use this file except in compliance with the License.
49 for file in files:
50 if os.stat(file).st_size == 0:
52 if not file.endswith('.a.txt'):
54 notice_file_name = os.path.basename(file)
55 if file not in basenames:
57 valid_notices.append(file)
58 depfiles.append(file)
60 for file in valid_notices:
75 os.path.basename(file))
77 shutil.copyfile(file, dest)
78 if os.path.isfile("{}.json".format(file)):
80 shutil.copyfile("{}.json".format(file), "{}.json".format(dest))
83 def write_file(file: str, string: str):
84 print(string, file=file)
87 def compute_hash(file: str):
89 with open(file, 'rb') as file_fd:
105 write_file(output_file, "Notices for file(s):")
166 output_file, '<file-name content_id="%s">%s</file-name>' %
173 # write the notice file lists
183 '<file-content content_id="{}"><![CDATA[{}]]></file-content>'
187 # write the file complete node.
203 for file in files:
204 with open(file, 'r') as fd:
229 for file in zipfiles:
230 txt_files.append(handle_zipfile_notices(file))
232 for file in txt_files:
233 if os.stat(file).st_size == 0:
235 file_hash = compute_hash(file)
236 files_with_same_hash[file_hash].append(file)
291 help='module info file for notice target')
293 help='install directories of notice file')