fs

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultFS

type DefaultFS struct{}

DefaultFS implements FileSystem using the local disk

func (DefaultFS) MD5Sum

func (DefaultFS) MD5Sum(name string) (string, error)

func (DefaultFS) Open

func (DefaultFS) Open(name string) (*os.File, error)

func (DefaultFS) ReadFile

func (DefaultFS) ReadFile(name string) ([]byte, error)

func (DefaultFS) Remove

func (DefaultFS) Remove(name string) error

func (DefaultFS) Rename

func (DefaultFS) Rename(oldpath string, newpath string) error

func (DefaultFS) Stat

func (DefaultFS) Stat(name string) (os.FileInfo, error)

func (DefaultFS) WriteFile

func (DefaultFS) WriteFile(name string, data []byte, perm os.FileMode) error

type FileSystem

type FileSystem interface {
	Stat(name string) (os.FileInfo, error)
	ReadFile(name string) ([]byte, error)
	WriteFile(name string, data []byte, perm os.FileMode) error
	Open(name string) (*os.File, error)
	Rename(oldpath string, newpath string) error
	Remove(name string) error
	MD5Sum(name string) (string, error)
}

Directories

Path Synopsis
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

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