Help us shape the future of Go! Take the 2026 Go Developer Survey

filesystem

package
v0.47.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: MIT Imports: 3 Imported by: 2

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