disk

package
v0.0.0-...-f4bd7b1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

type Disk struct {
	// contains filtered or unexported fields
}

Disk container for disk parameters

func New

func New(diskPath string) (Disk, *probe.Error)

New - instantiate new disk

func (Disk) CreateFile

func (disk Disk) CreateFile(filename string) (*atomic.File, *probe.Error)

CreateFile - create a file inside disk root path, replies with custome disk.File which provides atomic writes

func (Disk) GetFSInfo

func (disk Disk) GetFSInfo() map[string]string

GetFSInfo - get disk filesystem and its usage information

func (Disk) GetPath

func (disk Disk) GetPath() string

GetPath - get root disk path

func (Disk) IsUsable

func (disk Disk) IsUsable() bool

IsUsable - is disk usable, alive

func (Disk) ListDir

func (disk Disk) ListDir(dirname string) ([]os.FileInfo, *probe.Error)

ListDir - list a directory inside disk root path, get only directories

func (Disk) ListFiles

func (disk Disk) ListFiles(dirname string) ([]os.FileInfo, *probe.Error)

ListFiles - list a directory inside disk root path, get only files

func (Disk) MakeDir

func (disk Disk) MakeDir(dirname string) *probe.Error

MakeDir - make a directory inside disk root path

func (Disk) Open

func (disk Disk) Open(filename string) (*os.File, *probe.Error)

Open - read a file inside disk root path

func (Disk) OpenFile

func (disk Disk) OpenFile(filename string, flags int, perm os.FileMode) (*os.File, *probe.Error)

OpenFile - Use with caution

type InvalidArgument

type InvalidArgument struct{}

InvalidArgument invalid argument

func (InvalidArgument) Error

func (e InvalidArgument) Error() string

type UnsupportedFilesystem

type UnsupportedFilesystem struct {
	Type string
}

UnsupportedFilesystem unsupported filesystem type

func (UnsupportedFilesystem) Error

func (e UnsupportedFilesystem) Error() string

Jump to

Keyboard shortcuts

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