memory

package
v0.0.0-...-c4d1857 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package memory provides a FileSystem implementation backed by a in-memory storage mechanism that does not require any access to the underlying OS. All File IO operations happen in memory making this FileSystem ideal for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() fsx.FileSystem

New creates and returns a new fsx.FileSystem backed by an in-memory storage system so that file io operations can be performed as normal but without touching the real OS filesystem.

Types

type InMemory

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

InMemory is an implementation of an fsx.FileSystem backed by an in-memory storage backend.

func (*InMemory) Create

func (i *InMemory) Create(name string) (fsx.File, error)

Create creates a new named file (truncating it if it already exists).

Jump to

Keyboard shortcuts

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