files

package
v1.72.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package files implements io/fs objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewArchiveFileInfo

func NewArchiveFileInfo(ctx context.Context, entry fs.DirEntry, prefix string, metadata fs.Metadata) archives.FileInfo

NewArchiveFileInfo will take a fs.DirEntry and return a archives.Fileinfo

Types

type CountWriter

type CountWriter struct {
	// contains filtered or unexported fields
}

CountWriter counts bytes written through it. It is safe for concurrent Count/Reset; Write is as safe as the wrapped Writer.

func NewCountWriter

func NewCountWriter(w io.Writer) *CountWriter

NewCountWriter wraps w (use nil if you want to drop data).

func (*CountWriter) Count

func (cw *CountWriter) Count() uint64

Count returns the total bytes written.

func (*CountWriter) Write

func (cw *CountWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL