embedfs

package
v6.0.0-...-06ff513 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

embedfs exposes an embed.FS as a read-only billy.Filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(efs *embed.FS) billy.Filesystem

Types

type Embed

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

func (*Embed) Chroot

func (fs *Embed) Chroot(_ string) (billy.Filesystem, error)

Chroot is not supported.

Calls will always return billy.ErrNotSupported.

func (*Embed) Create

func (fs *Embed) Create(_ string) (billy.File, error)

Create is not supported.

Calls will always return billy.ErrReadOnly.

func (*Embed) Join

func (fs *Embed) Join(elem ...string) string

Join return a path with all elements joined by forward slashes.

This behaviour is OS-agnostic.

func (*Embed) Lstat

func (fs *Embed) Lstat(_ string) (os.FileInfo, error)

Lstat is not supported.

Calls will always return billy.ErrNotSupported.

func (*Embed) MkdirAll

func (fs *Embed) MkdirAll(_ string, _ os.FileMode) error

MkdirAll is not supported.

Calls will always return billy.ErrReadOnly.

func (*Embed) Open

func (fs *Embed) Open(filename string) (billy.File, error)

func (*Embed) OpenFile

func (fs *Embed) OpenFile(filename string, flag int, _ os.FileMode) (billy.File, error)

func (*Embed) ReadDir

func (fs *Embed) ReadDir(path string) ([]os.FileInfo, error)
func (fs *Embed) Readlink(_ string) (string, error)

Readlink is not supported.

Calls will always return billy.ErrNotSupported.

func (*Embed) Remove

func (fs *Embed) Remove(_ string) error

Remove is not supported.

Calls will always return billy.ErrReadOnly.

func (*Embed) Rename

func (fs *Embed) Rename(_, _ string) error

Rename is not supported.

Calls will always return billy.ErrReadOnly.

func (*Embed) Root

func (fs *Embed) Root() string

func (*Embed) Stat

func (fs *Embed) Stat(filename string) (os.FileInfo, error)
func (fs *Embed) Symlink(_, _ string) error

Symlink is not supported.

Calls will always return billy.ErrReadOnly.

func (*Embed) TempFile

func (fs *Embed) TempFile(_, _ string) (billy.File, error)

TempFile is not supported.

Calls will always return billy.ErrNotSupported.

Jump to

Keyboard shortcuts

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