vfs

package
v3.2.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(dir string) string

Clean is a wrapper for filepath.Clean.

func IsExist

func IsExist(err error) bool

IsExist returns a boolean value indicating whether the specified error is to indicate that a file or directory already exists.

func IsNotExist

func IsNotExist(err error) bool

IsNotExist returns a boolean value indicating whether the specified error is to indicate that a file or directory does not exist.

func TempDir

func TempDir() string

TempDir returns the directory use for storing temporary files.

Types

type File

type File = gvfs.File

File is the file interface returned by IFS.

type IFS

type IFS = gvfs.FS

IFS is the vfs interface used by dragonboat.

var DefaultFS IFS = gvfs.Default

DefaultFS is a vfs instance using underlying OS fs.

var MemStrictFS IFS = gvfs.NewStrictMem()

MemStrictFS is a vfs instance using memfs.

func GetFS

func GetFS() IFS

GetFS returns the vfs instance used in normal run.

func GetTestFS

func GetTestFS() IFS

GetTestFS returns the vfs instance used in tests.

type MemFS

type MemFS = gvfs.MemFS

MemFS is a memory backed file system for testing purposes.

Jump to

Keyboard shortcuts

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