staticfs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package staticfs implements a read-only in-memory file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) (p9.Attacher, error)

New creates a new read-only static file system defined by the files passed with opts.

staticfs only supports one directory with regular files.

func ReadOnlyFile

func ReadOnlyFile(content string) p9.File

ReadOnlyFile returns a read-only p9.File using a QID with path 0.

Types

type Option

type Option func(*attacher) error

Option is a configurator for New.

func WithFile

func WithFile(name, content string) Option

WithFile includes the file named name with file contents content in the file system.

Jump to

Keyboard shortcuts

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