Home | History | Annotate | Download | only in zip

Lines Matching defs:File

3 // license that can be found in the LICENSE file.
19 ErrFormat = errors.New("zip: not a valid zip file")
26 File []*File
32 f *os.File
36 type File struct {
44 func (f *File) hasDataDescriptor() bool {
48 // OpenReader will open the Zip file specified by name and return a ReadCloser.
87 z.File = make([]*File, 0, end.directoryRecords)
98 // the file count modulo 65536 is incorrect.
100 f := &File{zip: z, zipr: r, zipsize: size}
108 z.File = append(z.File, f)
110 if uint16(len(z.File)) != uint16(end.directoryRecords) { // only compare 16 bits here
136 // Close closes the Zip file, rendering it unusable for I/O.
141 // DataOffset returns the offset of the file's possibly-compressed
142 // data, relative to the beginning of the zip file.
146 func (f *File) DataOffset() (offset int64, err error) {
154 // Open returns a ReadCloser that provides access to the File's contents.
156 func (f *File) Open() (io.ReadCloser, error) {
185 f *File
216 // the CRC32 of what we've read against the file header
229 // findBodyOffset does the minimum work to verify the file has a header
230 // and returns the file body offset.
231 func (f *File) findBodyOffset() (int64, error) {
249 func readDirectoryHeader(f *File, r io.Reader) error {
333 // an old zip32 file that was sharding inputs into the largest chunks
349 func readDataDescriptor(r io.Reader, f *File) error {
428 // These values mean that the file can be a zip64 file
438 // Make sure directoryOffset points to somewhere in our file.
451 return -1, nil // no need to look for a header outside the file
462 return -1, nil // the file is not a valid zip64-file
466 return -1, nil // the file is not a valid zip64-file