Lines Matching refs:input_file

742 def DoesInputFileContain(input_file, fn):  argument
744 if isinstance(input_file, zipfile.ZipFile):
745 return fn in input_file.namelist()
746 elif zipfile.is_zipfile(input_file):
747 with zipfile.ZipFile(input_file, "r", allowZip64=True) as zfp:
750 if not os.path.isdir(input_file):
752 … ZipFile object, path to .zip file on disk, or path to extracted directory. Actual: " + input_file)
753 path = os.path.join(input_file, *fn.split("/"))
757 def ReadBytesFromInputFile(input_file, fn): argument
759 if isinstance(input_file, zipfile.ZipFile):
760 return input_file.read(fn)
761 elif zipfile.is_zipfile(input_file):
762 with zipfile.ZipFile(input_file, "r", allowZip64=True) as zfp:
765 if not os.path.isdir(input_file):
767 … ZipFile object, path to .zip file on disk, or path to extracted directory. Actual: " + input_file)
768 path = os.path.join(input_file, *fn.split("/"))
777 def ReadFromInputFile(input_file, fn): argument
779 return ReadBytesFromInputFile(input_file, fn).decode()
782 def WriteBytesToInputFile(input_file, fn, data): argument
784 if isinstance(input_file, zipfile.ZipFile):
785 with input_file.open(fn, "w") as entry_fp:
787 elif zipfile.is_zipfile(input_file):
788 with zipfile.ZipFile(input_file, "r", allowZip64=True) as zfp:
792 if not os.path.isdir(input_file):
794 … ZipFile object, path to .zip file on disk, or path to extracted directory. Actual: " + input_file)
795 path = os.path.join(input_file, *fn.split("/"))
804 def WriteToInputFile(input_file, fn, str: str): argument
806 return WriteBytesToInputFile(input_file, fn, str.encode())
809 def ExtractFromInputFile(input_file, fn): argument
811 if isinstance(input_file, zipfile.ZipFile):
814 f.write(input_file.read(fn))
816 elif zipfile.is_zipfile(input_file):
817 with zipfile.ZipFile(input_file, "r", allowZip64=True) as zfp:
823 if not os.path.isdir(input_file):
825 … ZipFile object, path to .zip file on disk, or path to extracted directory. Actual: " + input_file)
826 file = os.path.join(input_file, *fn.split("/"))
845 def LoadInfoDict(input_file, repacking=False): argument
878 assert isinstance(input_file, str), \
882 return ReadFromInputFile(input_file, fn)
900 fc_config = os.path.join(input_file, "META", fc_basename)
906 d["root_dir"] = os.path.join(input_file, "ROOT")
908 input_file, "META", "root_filesystem_config.txt")
917 base_fs_file = os.path.join(input_file, "META", basename)
945 d["fstab"] = _FindAndLoadRecoveryFstab(d, input_file, read_helper)
953 input_file, partition, ramdisk_format=ramdisk_format)
1022 def __init__(self, input_file, name, placeholder_values=None): argument
1023 self.input_file = input_file
1042 def FromInputFile(input_file, name, placeholder_values=None, ramdisk_format=RamdiskFormat.LZ4): argument
1047 input_file, name, ramdisk_format=ramdisk_format)
1049 data = PartitionBuildProps._ReadPartitionPropFile(input_file, name)
1051 props = PartitionBuildProps(input_file, name, placeholder_values)
1056 def _ReadBootPropFile(input_file, partition_name, ramdisk_format): argument
1063 boot_img = ExtractFromInputFile(input_file, image_path)
1074 def _ReadPartitionPropFile(input_file, name): argument
1083 data = ReadFromInputFile(input_file, prop_file)
1153 lines = ReadFromInputFile(self.input_file, import_path).split('\n')
1231 def _FindAndLoadRecoveryFstab(info_dict, input_file, read_helper): argument
1245 if not DoesInputFileContain(input_file, recovery_fstab_path):
1252 if not DoesInputFileContain(input_file, recovery_fstab_path):