filesystem

package
v0.58.1-0...-af594cf Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(fs Service, filename string) ([]byte, error)

ReadFile will open the file from the service and read the entire contents.

Types

type File

type File interface {
	io.ReadWriteCloser
	io.Seeker
	Stat() (os.FileInfo, error)
}

File is an interface for interacting with a file.

type Service

type Service interface {
	Open(fpath string) (File, error)
	Create(fpath string) (File, error)
	Stat(fpath string) (os.FileInfo, error)
}

Service is the service for accessing the filesystem.

var SystemFS Service = systemFS{}

SystemFS implements the filesystem.Service by proxying all requests to the filesystem.

Jump to

Keyboard shortcuts

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