fs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

An FS provides access to a hierarchical file system.

func Must

func Must(fsys fs.FS, name string) FS

Must panics if there is an error returning the subtree

func NewFS

func NewFS(fsys fs.FS) *FS

func Sub

func Sub(fsys fs.FS, name string) (FS, error)

Sub returns an FS corresponding to the subtree rooted at fsys's dir.

func (FS) Open

func (fsys FS) Open(name string) (fs.File, error)

Open tries to open the file with the supplied name. If not found retires with `.html` extension

Jump to

Keyboard shortcuts

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