- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for isHeaderOnlyType (0.2 sec)
-
src/archive/tar/common.go
fs.FileInfo // Uname should give a user name. Uname() (string, error) // Gname should give a group name. Gname() (string, error) } // isHeaderOnlyType checks if the given type flag is of the type that has no // data section even if a size is specified. func isHeaderOnlyType(flag byte) bool { switch flag { case TypeLink, TypeSymlink, TypeChar, TypeBlock, TypeDir, TypeFifo: return true default: return false }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 15 16:01:50 GMT 2024 - 24.7K bytes - Viewed (2) -
src/archive/tar/reader.go
// can only read the following logical data section. It will properly handle // special headers that contain no data section. func (tr *Reader) handleRegularFile(hdr *Header) error { nb := hdr.Size if isHeaderOnlyType(hdr.Typeflag) { nb = 0 } if nb < 0 { return ErrHeader } tr.pad = blockPadding(nb) tr.curr = ®FileReader{r: tr.r, nb: nb} return nil }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
src/archive/tar/writer.go
func (tw *Writer) writeRawHeader(blk *block, size int64, flag byte) error { if err := tw.Flush(); err != nil { return err } if _, err := tw.w.Write(blk[:]); err != nil { return err } if isHeaderOnlyType(flag) { size = 0 } tw.curr = ®FileWriter{tw.w, size} tw.pad = blockPadding(size) return nil } // AddFS adds the files from fs.FS to the archive.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 19.6K bytes - Viewed (0)