fileutils

package
v0.0.0-...-3a98d3a Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package fileutils defines generic file utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextualReaderWrapper

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

ContextualReaderWrapper is a wrapper around an existing io.Reader that allows for the interruption of reads with the cancellation of a context.

func NewContextualReaderWrapper

func NewContextualReaderWrapper(ctx context.Context, reader io.Reader) *ContextualReaderWrapper

NewContextualReaderWrapper initializes a new ContextualReaderWrapper.

func (*ContextualReaderWrapper) Read

func (c *ContextualReaderWrapper) Read(p []byte) (n int, err error)

Read calls io.Reader.Read on the wrapped reader, allowing for interruption from a cancellation of the context.

Jump to

Keyboard shortcuts

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