Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for FormatUnknown (0.48 sec)

  1. cmd/untar.go

    func detect(r *bufio.Reader) format {
    	z, err := r.Peek(4)
    	if err != nil {
    		return formatUnknown
    	}
    	for _, f := range magicHeaders {
    		if bytes.Equal(f.header, z[:len(f.header)]) {
    			return f.f
    		}
    	}
    	return formatUnknown
    }
    
    //go:generate stringer -type=format -trimprefix=format $GOFILE
    type format int
    
    const (
    	formatUnknown format = iota
    	formatGzip
    	formatZstd
    	formatLZ4
    	formatS2
    	formatBZ2
    )
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. src/archive/tar/common.go

    		// Exclude TypeLink and TypeSymlink, since they may reference directories.
    		if strings.HasSuffix(h.Name, "/") {
    			return FormatUnknown, nil, headerError{"filename may not have trailing slash"}
    		}
    	case TypeXHeader, TypeGNULongName, TypeGNULongLink:
    		return FormatUnknown, nil, headerError{"cannot manually encode TypeXHeader, TypeGNULongName, or TypeGNULongLink headers"}
    	case TypeXGlobalHeader:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 16:01:50 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  3. cmd/format_string.go

    package cmd
    
    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[formatUnknown-0]
    	_ = x[formatGzip-1]
    	_ = x[formatZstd-2]
    	_ = x[formatLZ4-3]
    	_ = x[formatS2-4]
    	_ = x[formatBZ2-5]
    }
    
    const _format_name = "UnknownGzipZstdLZ4S2BZ2"
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 737 bytes
    - Viewed (0)
  4. src/archive/tar/format.go

    // Constants to identify various tar formats.
    const (
    	// Deliberately hide the meaning of constants from public API.
    	_ Format = (1 << iota) / 4 // Sequence of 0, 0, 1, 2, 4, 8, etc...
    
    	// FormatUnknown indicates that the format is unknown.
    	FormatUnknown
    
    	// The format of the original Unix V7 tar tool prior to standardization.
    	formatV7
    
    	// FormatUSTAR represents the USTAR header format defined in POSIX.1-1988.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 18:36:46 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  5. src/archive/tar/reader.go

    			if bytes.IndexFunc(tr.blk[:], notASCII) >= 0 {
    				hdr.Format = FormatUnknown // Non-ASCII characters in block.
    			}
    			nul := func(b []byte) bool { return int(b[len(b)-1]) == 0 }
    			if !(nul(v7.size()) && nul(v7.mode()) && nul(v7.uid()) && nul(v7.gid()) &&
    				nul(v7.modTime()) && nul(ustar.devMajor()) && nul(ustar.devMinor())) {
    				hdr.Format = FormatUnknown // Numeric fields must end in NUL
    			}
    		case format.has(formatSTAR):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  6. api/go1.10.txt

    pkg archive/tar, const FormatPAX = 4
    pkg archive/tar, const FormatPAX Format
    pkg archive/tar, const FormatUSTAR = 2
    pkg archive/tar, const FormatUSTAR Format
    pkg archive/tar, const FormatUnknown = 0
    pkg archive/tar, const FormatUnknown Format
    pkg archive/tar, method (Format) String() string
    pkg archive/tar, type Format int
    pkg archive/tar, type Header struct, Format Format
    pkg archive/tar, type Header struct, PAXRecords map[string]string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 06 05:00:01 UTC 2018
    - 30.1K bytes
    - Viewed (0)
  7. src/archive/tar/reader_test.go

    		// Write the initial GNU header.
    		var blk block
    		gnu := blk.toGNU()
    		sparse := gnu.sparse()
    		copy(gnu.realSize(), size)
    		sps = populateSparseMap(sparse, sps)
    		if format != FormatUnknown {
    			blk.setFormat(format)
    		}
    		out = append(out, blk[:]...)
    
    		// Write extended sparse blocks.
    		for len(sps) > 0 {
    			var blk block
    			sps = populateSparseMap(blk.toSparse(), sps)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 21 21:14:38 UTC 2022
    - 47.1K bytes
    - Viewed (0)
  8. src/archive/tar/writer.go

    	// This ensures nominal usage of WriteHeader (without specifying the format)
    	// does not always result in the PAX format being chosen, which
    	// causes a 1KiB increase to every header.
    	if tw.hdr.Format == FormatUnknown {
    		tw.hdr.ModTime = tw.hdr.ModTime.Round(time.Second)
    		tw.hdr.AccessTime = time.Time{}
    		tw.hdr.ChangeTime = time.Time{}
    	}
    
    	allowedFormats, paxHdrs, err := tw.hdr.allowedFormats()
    	switch {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"ErrWriteAfterClose", Var, 0},
    		{"ErrWriteTooLong", Var, 0},
    		{"FileInfoHeader", Func, 1},
    		{"Format", Type, 10},
    		{"FormatGNU", Const, 10},
    		{"FormatPAX", Const, 10},
    		{"FormatUSTAR", Const, 10},
    		{"FormatUnknown", Const, 10},
    		{"Header", Type, 0},
    		{"Header.AccessTime", Field, 0},
    		{"Header.ChangeTime", Field, 0},
    		{"Header.Devmajor", Field, 0},
    		{"Header.Devminor", Field, 0},
    		{"Header.Format", Field, 10},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top