Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for WriteHeader (0.14 sec)

  1. src/archive/tar/writer.go

    		return tw.err
    	}
    	tw.pad = 0
    	return nil
    }
    
    // WriteHeader writes hdr and prepares to accept the file's contents.
    // The Header.Size determines how many bytes can be written for the next file.
    // If the current file is not fully written, then this returns an error.
    // This implicitly flushes any padding necessary before writing the header.
    func (tw *Writer) WriteHeader(hdr *Header) error {
    	if err := tw.Flush(); err != nil {
    		return err
    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)
  2. src/archive/zip/writer.go

    		}
    		fw.rawCount = &countWriter{w: fw.comp}
    		fw.header = h
    		ow = fw
    	}
    	w.dir = append(w.dir, h)
    	if err := writeHeader(w.cw, h); err != nil {
    		return nil, err
    	}
    	// If we're creating a directory, fw is nil.
    	w.last = fw
    	return ow, nil
    }
    
    func writeHeader(w io.Writer, h *header) error {
    	const maxUint16 = 1<<16 - 1
    	if len(h.Name) > maxUint16 {
    		return errLongName
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
Back to top