- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for isHeaderOnlyType (0.18 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 }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Fri Sep 13 21:03:27 UTC 2024 - 24.5K bytes - Viewed (0) -
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 }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Fri Mar 08 01:59:14 UTC 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.
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Feb 03 16:38:43 UTC 2025 - 19.7K bytes - Viewed (0)