Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 1,541 for readArg (0.91 sec)

  1. src/bufio/bufio.go

    // NewReaderSize returns a new [Reader] whose buffer has at least the specified
    // size. If the argument io.Reader is already a [Reader] with large enough
    // size, it returns the underlying [Reader].
    func NewReaderSize(rd io.Reader, size int) *Reader {
    	// Is it already a Reader?
    	b, ok := rd.(*Reader)
    	if ok && len(b.buf) >= size {
    		return b
    	}
    	r := new(Reader)
    	r.reset(make([]byte, max(size, minReadBufferSize)), rd)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 14:39:08 UTC 2023
    - 21.8K bytes
    - Viewed (0)
  2. pkg/file/file.go

    // limitations under the License.
    
    package file
    
    import (
    	"bytes"
    	"errors"
    	"fmt"
    	"io"
    	"io/fs"
    	"os"
    	"path/filepath"
    )
    
    // AtomicCopy copies file by reading the file then writing atomically into the target directory
    func AtomicCopy(srcFilepath, targetDir, targetFilename string) error {
    	in, err := os.Open(srcFilepath)
    	if err != nil {
    		return err
    	}
    	defer in.Close()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 21:42:29 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/CharSink.java

          closer.close();
        }
      }
    
      /**
       * Writes all the text from the given {@link Readable} (such as a {@link Reader}) to this sink.
       * Does not close {@code readable} if it is {@code Closeable}.
       *
       * @return the number of characters written
       * @throws IOException if an I/O error occurs while reading from {@code readable} or writing to
       *     this sink
       */
      @CanIgnoreReturnValue
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  4. src/go/parser/interface.go

    // otherwise it returns an error. If src == nil, readSource returns
    // the result of reading the file specified by filename.
    func readSource(filename string, src any) ([]byte, error) {
    	if src != nil {
    		switch s := src.(type) {
    		case string:
    			return []byte(s), nil
    		case []byte:
    			return s, nil
    		case *bytes.Buffer:
    			// is io.Reader, but src is already available in []byte form
    			if s != nil {
    				return s.Bytes(), nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  5. pkg/config/analysis/local/istiod_analyze.go

    	ResourceName string
    }
    
    // ReaderSource is a tuple of a io.Reader and filepath.
    type ReaderSource struct {
    	// Name is the name of the source (commonly the path to a file, but can be "-" for sources read from stdin or "" if completely synthetic).
    	Name string
    	// Reader is the reader instance to use.
    	Reader io.Reader
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 21:06:13 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  6. src/cmd/pprof/readlineui.go

    	if err != nil {
    		return nil
    	}
    	term.Restore(0, oldState)
    
    	rw := struct {
    		io.Reader
    		io.Writer
    	}{os.Stdin, os.Stderr}
    	return &readlineUI{term: term.NewTerminal(rw, "")}
    }
    
    // ReadLine returns a line of text (a command) read from the user.
    // prompt is printed before reading the command.
    func (r *readlineUI) ReadLine(prompt string) (string, error) {
    	r.term.SetPrompt(prompt)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 30 18:10:36 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  7. src/internal/trace/generation.go

    			if err != nil {
    				return fmt.Errorf("reading frame %d's PC for stack %d: %w", i+1, id, err)
    			}
    			funcID, err := binary.ReadUvarint(r)
    			if err != nil {
    				return fmt.Errorf("reading frame %d's funcID for stack %d: %w", i+1, id, err)
    			}
    			fileID, err := binary.ReadUvarint(r)
    			if err != nil {
    				return fmt.Errorf("reading frame %d's fileID for stack %d: %w", i+1, id, err)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 22:14:45 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  8. src/debug/dwarf/entry_test.go

    	// A hand-crafted input corresponding to a minimal-size
    	// .debug_info (header only, no DIEs) and an empty abbrev table.
    	data0, _ := New(abbrev, aranges, frame, info, line, pubnames, ranges, str)
    	reader0 := data0.Reader()
    	entry0, _ := reader0.SeekPC(0x0)
    	// main goal is to make sure we can get here without crashing
    	if entry0 != nil {
    		t.Errorf("got non-nil entry0, wanted nil")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 18 20:34:36 UTC 2023
    - 16.1K bytes
    - Viewed (0)
  9. src/internal/zstd/fse.go

    	}
    
    	return nil
    }
    
    // fseBaselineEntry is an entry in an FSE baseline table.
    // We use these for literal/match/length values.
    // Those require mapping the symbol to a baseline value,
    // and then reading zero or more bits and adding the value to the baseline.
    // Rather than looking these up in separate tables,
    // we convert the FSE table to an FSE baseline table.
    type fseBaselineEntry struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:44:06 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  10. cmd/erasure-object.go

    			readers[index] = newBitrotReader(disk, metaArr[index].Data, bucket, partPath, tillOffset,
    				checksumInfo.Algorithm, checksumInfo.Hash, erasure.ShardSize())
    
    			// Prefer local disks
    			prefer[index] = disk.Hostname() == ""
    		}
    
    		written, err := erasure.Decode(ctx, writer, readers, partOffset, partLength, partSize, prefer)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 78.6K bytes
    - Viewed (0)
Back to top