- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for FileHeader (0.2 sec)
-
src/archive/zip/struct.go
ExternalAttrs uint32 // Meaning depends on CreatorVersion } // FileInfo returns an fs.FileInfo for the [FileHeader]. func (h *FileHeader) FileInfo() fs.FileInfo { return headerFileInfo{h} } // headerFileInfo implements [fs.FileInfo]. type headerFileInfo struct { fh *FileHeader } func (fi headerFileInfo) Name() string { return path.Base(fi.fh.Name) } func (fi headerFileInfo) Size() int64 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue May 28 21:41:09 UTC 2024 - 12.1K bytes - Viewed (0) -
src/archive/zip/writer_test.go
if idx == -1 { t.Fatal("file header not found") } b = b[idx:] if !bytes.Equal(b[6:10], []byte{0, 0, 0, 0}) { // FileHeader.Flags: 0, FileHeader.Method: 0 t.Errorf("unexpected method and flags: %v", b[6:10]) } if !bytes.Equal(b[14:26], make([]byte, 12)) { // FileHeader.{CRC32,CompressSize,UncompressedSize} all zero. t.Errorf("unexpected crc, compress and uncompressed size to be 0 was: %v", b[14:26]) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 14.4K bytes - Viewed (0) -
src/archive/zip/zip_test.go
t.Errorf("ModifiedDate: got %d, want %d\n", got, want) } if sysfh, ok := fi.Sys().(*FileHeader); !ok && sysfh != fh { t.Errorf("Sys didn't return original *FileHeader") } } func TestFileHeaderRoundTrip(t *testing.T) { fh := &FileHeader{ Name: "foo.txt", UncompressedSize: 987654321, ModifiedTime: 1234, ModifiedDate: 5678, }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0) -
src/archive/zip/writer.go
// CreateHeader and CreateRaw. func (w *Writer) prepare(fh *FileHeader) error { if w.last != nil && !w.last.closed { if err := w.last.close(); err != nil { return err } } if len(w.dir) > 0 && w.dir[len(w.dir)-1].FileHeader == fh { // See https://golang.org/issue/11144 confusion. return errors.New("archive/zip: invalid duplicate FileHeader") } return nil }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 19.4K bytes - Viewed (0) -
src/archive/zip/fuzz_test.go
if err != nil { return } type file struct { header *FileHeader content []byte } files := []file{} for _, f := range r.File { fr, err := f.Open() if err != nil { continue } content, err := io.ReadAll(fr) if err != nil { continue } files = append(files, file{header: &f.FileHeader, content: content}) if _, err := r.Open(f.Name); err != nil { continue
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jan 13 18:06:33 UTC 2022 - 1.7K bytes - Viewed (0) -
src/archive/zip/reader.go
type ReadCloser struct { f *os.File Reader } // A File is a single file in a ZIP archive. // The file information is in the embedded [FileHeader]. // The file content can be accessed by calling [File.Open]. type File struct { FileHeader zip *Reader zipr io.ReaderAt headerOffset int64 // includes overall ZIP archive baseOffset
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
lib/time/mkzip.go
if err != nil { log.Fatal(err) } if strings.HasSuffix(path, ".zip") { log.Fatalf("unexpected file during walk: %s", path) } name := filepath.ToSlash(path) w, err := zw.CreateRaw(&zip.FileHeader{ Name: name, Method: zip.Store, CompressedSize64: uint64(len(data)), UncompressedSize64: uint64(len(data)), CRC32: crc32.ChecksumIEEE(data), })
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Mar 04 17:32:07 UTC 2024 - 2.1K bytes - Viewed (0) -
api/go1.17.txt
pkg archive/zip, method (*File) OpenRaw() (io.Reader, error) pkg archive/zip, method (*Writer) Copy(*File) error pkg archive/zip, method (*Writer) CreateRaw(*FileHeader) (io.Writer, error) pkg compress/lzw, method (*Reader) Close() error pkg compress/lzw, method (*Reader) Read([]uint8) (int, error) pkg compress/lzw, method (*Reader) Reset(io.Reader, Order, int) pkg compress/lzw, method (*Writer) Close() error
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Feb 17 20:31:46 UTC 2023 - 18K bytes - Viewed (0) -
src/archive/zip/reader_test.go
b[0x11]++ b[0x9d]++ // TODO(bradfitz): add a new test that only corrupts // one of these values, and verify that that's also an // error. Currently, the reader code doesn't verify the // fileheader and TOC's crc32 match if they're both // non-zero and only the second line above, the TOC, // is what matters. }) } // rZipBytes returns the bytes of a recursive zip file, without
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 55.6K bytes - Viewed (0) -
api/go1.16.txt
pkg archive/zip, method (*FileHeader) ModTime //deprecated pkg archive/zip, method (*FileHeader) SetModTime //deprecated pkg archive/zip, type FileHeader struct, CompressedSize //deprecated pkg archive/zip, type FileHeader struct, ModifiedDate //deprecated pkg archive/zip, type FileHeader struct, ModifiedTime //deprecated pkg archive/zip, type FileHeader struct, UncompressedSize //deprecated
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Dec 02 16:30:41 UTC 2022 - 479.2K bytes - Viewed (0)