Lines Matching refs:write

2 Read and write ZIP files.
451 # Set these to zero because we write them after the file data
794 def write(self, data):
795 n = self.fp.write(data)
1156 def write(self, data):
1172 self._fileobj.write(data)
1184 self._fileobj.write(buf)
1201 self._fileobj.write(struct.pack(fmt, _DD_SIGNATURE, self._zinfo.CRC,
1205 # Seek backwards and write file header (which will now include
1211 self._fileobj.write(self._zinfo.FileHeader(self._zip64))
1223 """ Class with methods to open, read, write, close, list zip files.
1230 mode: The mode can be either read 'r', write 'w', exclusive create 'x',
1250 """Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
1270 # Check that we don't try to write with nonconforming codecs
1529 write to a file newly added to the archive.
1631 raise ValueError("Can't write to the ZIP file while there is "
1632 "another write handle open on it. "
1661 self.fp.write(zinfo.FileHeader(zip64))
1759 raise ValueError("write() requires mode 'w', 'x', or 'a'")
1762 "Attempt to write ZIP archive that was already closed")
1776 def write(self, filename, arcname=None,
1782 "Attempt to write to ZIP archive that was already closed")
1785 "Can't write to ZIP archive while an open writing handle exists"
1833 "Attempt to write to ZIP archive that was already closed")
1836 "Can't write to ZIP archive while an open writing handle exists."
1848 dest.write(data)
1882 self.fp.write(zinfo.FileHeader(False))
1890 """Close the file, and for mode 'w', 'x' and 'a' write the ending
1901 if self.mode in ('w', 'x', 'a') and self._didModify: # write ending records
1912 for zinfo in self.filelist: # write central directory
1960 self.fp.write(centdir)
1961 self.fp.write(filename)
1962 self.fp.write(extra_data)
1963 self.fp.write(zinfo.comment)
1978 # Need to write the ZIP64 end-of-archive records
1986 self.fp.write(zip64endrec)
1991 self.fp.write(zip64locrec)
1999 self.fp.write(endrec)
2000 self.fp.write(self._comment)
2055 self.write(fname, arcname)
2076 self.write(fname, arcname)
2093 self.write(fname, arcname)
2101 self.write(fname, arcname)
2134 # Use the __pycache__/*.pyc file, but write it to the legacy pyc
2140 # Use the __pycache__/*.pyc file, but write it to the legacy pyc
2146 # Use the __pycache__/*.pyc file, but write it to the legacy pyc
2617 zf.write(path, zippath, ZIP_DEFLATED)
2620 zf.write(path, zippath)