- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for Writer (0.05 sec)
-
src/archive/tar/writer.go
"path" "slices" "strings" "time" ) // Writer provides sequential writing of a tar archive. // [Writer.WriteHeader] begins a new file with the provided [Header], // 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
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Oct 02 14:22:59 UTC 2024 - 19.6K bytes - Viewed (0) -
src/archive/zip/writer.go
// for the file metadata. [Writer] takes ownership of fh and may mutate // its fields. The caller must not modify fh after calling [Writer.CreateHeader]. // // This returns a [Writer] to which the file contents should be written. // The file's contents must be written to the io.Writer before the next // call to [Writer.Create], [Writer.CreateHeader], [Writer.CreateRaw], or [Writer.Close].
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 19.4K bytes - Viewed (0) -
src/archive/tar/writer_test.go
} } } // testNonEmptyWriter wraps an io.Writer and ensures that // Write is never called with an empty buffer. type testNonEmptyWriter struct{ io.Writer } func (w testNonEmptyWriter) Write(b []byte) (int, error) { if len(b) == 0 { return 0, errors.New("unexpected empty Write call") } return w.Writer.Write(b) } func TestFileWriter(t *testing.T) { type (
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 39.4K bytes - Viewed (0) -
api/go1.17.txt
pkg archive/zip, method (*Writer) Copy(*File) error pkg archive/zip, method (*Writer) CreateRaw(*FileHeader) (io.Writer, error) pkg compress/lzw, method (*Reader) Close() error pkg compress/lzw, method (*Reader) Read([]uint8) (int, error) pkg compress/lzw, method (*Reader) Reset(io.Reader, Order, int) pkg compress/lzw, method (*Writer) Close() error pkg compress/lzw, method (*Writer) Reset(io.Writer, Order, int)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Feb 17 20:31:46 UTC 2023 - 18K bytes - Viewed (0) -
src/archive/zip/writer_test.go
w := NewWriter(io.Discard) dw, err := w.Create("dir/") if err != nil { t.Fatal(err) } if _, err := dw.Write(nil); err != nil { t.Errorf("Write(nil) to directory: got %v, want nil", err) } if _, err := dw.Write([]byte("hello")); err == nil { t.Error(`Write("hello") to directory: got nil error, want non-nil`) } } func TestWriterDirAttributes(t *testing.T) { var buf bytes.Buffer
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 14.4K bytes - Viewed (0) -
src/bufio/bufio.go
// size. If the argument io.Writer is already a [Writer] with large enough // size, it returns the underlying [Writer]. func NewWriterSize(w io.Writer, size int) *Writer { // Is it already a Writer? b, ok := w.(*Writer) if ok && len(b.buf) >= size { return b } if size <= 0 { size = defaultBufSize } return &Writer{ buf: make([]byte, size), wr: w, } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
api/go1.18.txt
pkg bufio, method (*Writer) AvailableBuffer() []uint8 pkg bufio, method (ReadWriter) AvailableBuffer() []uint8 pkg bytes, func Cut([]uint8, []uint8) ([]uint8, []uint8, bool) pkg bytes, func Title //deprecated pkg crypto/tls, method (*Conn) NetConn() net.Conn pkg crypto/tls, type Config struct, PreferServerCipherSuites //deprecated pkg crypto/x509, method (*CertPool) Subjects //deprecated pkg debug/buildinfo, func Read(io.ReaderAt) (*debug.BuildInfo, error)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Feb 17 20:31:46 UTC 2023 - 13K bytes - Viewed (0) -
src/archive/tar/common.go
var ( ErrHeader = errors.New("archive/tar: invalid tar header") ErrWriteTooLong = errors.New("archive/tar: write too long") ErrFieldTooLong = errors.New("archive/tar: header field too long") ErrWriteAfterClose = errors.New("archive/tar: write after close") ErrInsecurePath = errors.New("archive/tar: insecure file path")
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 13 21:03:27 UTC 2024 - 24.5K bytes - Viewed (0) -
src/archive/zip/zip_test.go
} for i := 0; i < chunks; i++ { _, err := f.Write(chunk) if err != nil { t.Fatal("write chunk:", err) } } if frag := int(size % chunkSize); frag > 0 { _, err := f.Write(chunk[:frag]) if err != nil { t.Fatal("write chunk:", err) } } end := []byte("END\n") _, err = f.Write(end) if err != nil { t.Fatal("write end:", err) } if err := w.Close(); err != nil {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0) -
src/archive/tar/tar_test.go
return n, nil } func (f *testFile) Write(b []byte) (int, error) { if len(b) == 0 { return 0, nil } if len(f.ops) == 0 { return 0, errors.New("unexpected Write operation") } s, ok := f.ops[0].(string) if !ok { return 0, errors.New("unexpected Write operation") } if !strings.HasPrefix(s, string(b)) { return 0, testError{fmt.Errorf("got Write(%q), want Write(%q)", b, s)} } if len(s) > len(b) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 23.9K bytes - Viewed (0)