safememfs

package
v0.0.0-...-989785b Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package safememfs wraps go-billy/memfs's Open to correctly handle opening directories

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SafeOpener

type SafeOpener struct {
	billy.Filesystem
}

SafeOpener is a billy.Filesystem that fixes Open() behavior on directories with a work-around

func New

func New() *SafeOpener

New creates a new billy/memfs file system that can handle opening directories

func (*SafeOpener) Open

func (s *SafeOpener) Open(name string) (billy.File, error)

Open reimplements memfs.FS.Open() to fix bad behavior on opening directories

Jump to

Keyboard shortcuts

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