fs

package
v4.0.0-rc4+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fs interace and implementations used by storage/filesystem

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClosed       = errors.New("file: Writing on closed file.")
	ErrReadOnly     = errors.New("this is a read-only filesystem")
	ErrNotSupported = errors.New("feature not supported")
)

Functions

This section is empty.

Types

type BaseFile

type BaseFile struct {
	BaseFilename string
	Closed       bool
}

func (*BaseFile) Filename

func (f *BaseFile) Filename() string

func (*BaseFile) IsClosed

func (f *BaseFile) IsClosed() bool

type File

type File interface {
	Filename() string
	IsClosed() bool
	io.Writer
	io.Reader
	io.Seeker
	io.Closer
}

type FileInfo

type FileInfo os.FileInfo

type Filesystem

type Filesystem interface {
	Create(filename string) (File, error)
	Open(filename string) (File, error)
	OpenFile(filename string, flag int, perm os.FileMode) (File, error)
	Stat(filename string) (FileInfo, error)
	ReadDir(path string) ([]FileInfo, error)
	TempFile(dir, prefix string) (File, error)
	Rename(from, to string) error
	Remove(filename string) error
	Join(elem ...string) string
	Dir(path string) Filesystem
	Base() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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