Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for formatPAXRecord (0.08 sec)

  1. src/archive/tar/strconv.go

    	if !ok {
    		return "", "", s, ErrHeader
    	}
    
    	if !validPAXRecord(k, v) {
    		return "", "", s, ErrHeader
    	}
    	return k, v, rem, nil
    }
    
    // formatPAXRecord formats a single PAX record, prefixing it with the
    // appropriate length.
    func formatPAXRecord(k, v string) (string, error) {
    	if !validPAXRecord(k, v) {
    		return "", ErrHeader
    	}
    
    	const padding = 3 // Extra padding for ' ', '=', and '\n'
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Aug 01 14:28:42 UTC 2023
    - 9K bytes
    - Viewed (0)
  2. src/archive/tar/writer.go

    	if len(paxHdrs) > 0 || isGlobal {
    		// Write each record to a buffer.
    		var buf strings.Builder
    		// Sort keys for deterministic ordering.
    		for _, k := range slices.Sorted(maps.Keys(paxHdrs)) {
    			rec, err := formatPAXRecord(k, paxHdrs[k])
    			if err != nil {
    				return err
    			}
    			buf.WriteString(rec)
    		}
    
    		// Write the extended header file.
    		var name string
    		var flag byte
    		if isGlobal {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 14:22:59 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top