util

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanDirs

func CleanDirs(path string) error

CleanDirs traverses the dir tree of the supplied path, removing any folders with zero children

func GetPathBuilder

func GetPathBuilder() *fastpath.Builder

GetPathBuilder fetches a fastpath.Builder object from the pool

func NopReadCloser

func NopReadCloser(r io.Reader) io.ReadCloser

NopReadCloser turns a supplied io.Reader into io.ReadCloser with a nop Close() implementation

func NopWriteCloser

func NopWriteCloser(w io.Writer) io.WriteCloser

NopWriteCloser turns a supplied io.Writer into io.WriteCloser with a nop Close() implementation

func PutPathBuilder

func PutPathBuilder(pb *fastpath.Builder)

PutPathBuilder places supplied fastpath.Builder back in the pool

func ReadCloserWithCallback

func ReadCloserWithCallback(rc io.ReadCloser, cb func()) io.ReadCloser

ReadCloserWithCallback adds a customizable callback to be called upon Close() of a supplied io.ReadCloser

func RetryOnEINTR

func RetryOnEINTR(do func() error) error

RetryOnEINTR is a low-level filesystem function for retrying syscalls on O_EINTR received

func WalkDir

func WalkDir(pb *fastpath.Builder, path string, walkFn func(string, fs.DirEntry)) error

WalkDir traverses the dir tree of the supplied path, performing the supplied walkFn on each entry

Types

This section is empty.

Jump to

Keyboard shortcuts

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