Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for entry (0.13 sec)

  1. src/archive/zip/reader.go

    			}
    
    			for dir := path.Dir(name); dir != "."; dir = path.Dir(dir) {
    				dirs[dir] = true
    			}
    
    			idx := len(r.fileList)
    			entry := fileListEntry{
    				name:  name,
    				file:  file,
    				isDir: isDir,
    			}
    			r.fileList = append(r.fileList, entry)
    			if isDir {
    				knownDirs[name] = idx
    			} else {
    				files[name] = idx
    			}
    		}
    		for dir := range dirs {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  2. src/bufio/example_test.go

    }
    
    // Use a Scanner with a custom split function to parse a comma-separated
    // list with an empty final value.
    func ExampleScanner_emptyFinalToken() {
    	// Comma-separated list; last entry is empty.
    	const input = "1,2,3,4,"
    	scanner := bufio.NewScanner(strings.NewReader(input))
    	// Define a split function that separates on commas.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  3. src/archive/tar/writer.go

    // and then Writer can be treated as an io.Writer to supply that file's data.
    type Writer struct {
    	w    io.Writer
    	pad  int64      // Amount of padding to write after current file entry
    	curr fileWriter // Writer for current file entry
    	hdr  Header     // Shallow copy of Header that is safe for mutations
    	blk  block      // Buffer to use as temporary local storage
    
    	// err is a persistent error.
    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)
  4. src/archive/tar/format.go

    func (h *headerUSTAR) devMinor() []byte  { return h[337:][:8] }
    func (h *headerUSTAR) prefix() []byte    { return h[345:][:155] }
    
    type sparseArray []byte
    
    func (s sparseArray) entry(i int) sparseElem { return sparseElem(s[i*24:]) }
    func (s sparseArray) isExtended() []byte     { return s[24*s.maxEntries():][:1] }
    func (s sparseArray) maxEntries() int        { return len(s) / 24 }
    
    type sparseElem []byte
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  5. src/archive/tar/reader_test.go

    				hdr, err := tr.Next()
    				if err != nil || hdr == nil {
    					t.Fatalf("entry %d, Next(): got %v, want %v", i, err, nil)
    				}
    				buf := make([]byte, tc.cnt)
    				if _, err := io.ReadFull(tr, buf); err != nil {
    					t.Fatalf("entry %d, ReadFull(): got %v, want %v", i, err, nil)
    				}
    				if string(buf) != tc.output {
    					t.Fatalf("entry %d, ReadFull(): got %q, want %q", i, string(buf), tc.output)
    				}
    			}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
  6. src/archive/zip/reader_test.go

    		}
    		t.FailNow()
    	}
    	info, err := dirEntries[0].Info()
    	if err != nil {
    		t.Fatalf("Error reading info entry: %v", err)
    	}
    	if name := info.Name(); name != "test.txt" {
    		t.Errorf("Inconsistent name in info entry: %v", name)
    	}
    }
    
    func TestUnderSize(t *testing.T) {
    	z, err := OpenReader("testdata/readme.zip")
    	if err != nil {
    		t.Fatal(err)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  7. src/archive/tar/common.go

    // that they are interested in preserving.
    type Header struct {
    	// Typeflag is the type of header entry.
    	// The zero value is automatically promoted to either TypeReg or TypeDir
    	// depending on the presence of a trailing slash in Name.
    	Typeflag byte
    
    	Name     string // Name of file entry
    	Linkname string // Target name of link (valid for TypeLink or TypeSymlink)
    
    	Size  int64  // Logical file size in bytes
    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)
  8. src/archive/tar/reader.go

    	for {
    		for i := 0; i < s.maxEntries(); i++ {
    			// This termination condition is identical to GNU and BSD tar.
    			if s.entry(i).offset()[0] == 0x00 {
    				break // Don't return, need to process extended headers (even if empty)
    			}
    			offset := p.parseNumeric(s.entry(i).offset())
    			length := p.parseNumeric(s.entry(i).length())
    			if p.err != nil {
    				return nil, p.err
    			}
    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)
  9. src/cmd/cgo/gcc.go

    	// for symbols in the object file, so it is not enough to print the
    	// preamble and hope the symbols we care about will be there.
    	// Instead, emit
    	//	__typeof__(names[i]) *__cgo__i;
    	// for each entry in names and then dereference the type we
    	// learn for __cgo__i.
    	var b bytes.Buffer
    	b.WriteString(builtinProlog)
    	b.WriteString(f.Preamble)
    	b.WriteString("#line 1 \"cgo-dwarf-inference\"\n")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/test/callback.go

    func testCallbackGC(t *testing.T) {
    	nestedCall(runtime.GC)
    }
    
    func testCallbackPanic(t *testing.T) {
    	// Make sure panic during callback unwinds properly.
    	if lockedOSThread() {
    		t.Fatal("locked OS thread on entry to TestCallbackPanic")
    	}
    	defer func() {
    		s := recover()
    		if s == nil {
    			t.Fatal("did not panic")
    		}
    		if s.(string) != "callback panic" {
    			t.Fatal("wrong panic:", s)
    		}
    		if lockedOSThread() {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 111.5K bytes
    - Viewed (0)
Back to top