safememfs

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 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 added in v0.1.12

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 added in v0.1.12

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