forensicfs

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Glob

func Glob(fs ForensicFS, pattern string) (matches []string, err error)

Glob returns the names of all files matching pattern or nil if there is no matching file. The syntax of patterns is the same as in Match. The pattern may describe hierarchical names such as /usr/*/bin/ed.

Glob ignores file system errors such as I/O errors reading directories. The only possible returned error is ErrBadPattern, when pattern is malformed.

This was adapted from (http://golang.org/pkg/path/filepath) and uses several built-ins from that package.

Types

type ForensicFS

type ForensicFS interface {
	Name() string
	Open(string) (ForensicItem, error)
}

type ForensicFileDefaults

type ForensicFileDefaults struct{}

func (*ForensicFileDefaults) IsDir

func (*ForensicFileDefaults) IsDir() bool

func (*ForensicFileDefaults) Readdirnames

func (*ForensicFileDefaults) Readdirnames(count int) ([]string, error)

type ForensicFolderDefaults

type ForensicFolderDefaults struct{}

func (*ForensicFolderDefaults) IsDir

func (*ForensicFolderDefaults) IsDir() bool

func (*ForensicFolderDefaults) Mode

func (*ForensicFolderDefaults) Read

func (*ForensicFolderDefaults) Read(p []byte) (n int, err error)

func (*ForensicFolderDefaults) ReadAt

func (*ForensicFolderDefaults) ReadAt(p []byte, off int64) (n int, err error)

func (*ForensicFolderDefaults) Seek

func (*ForensicFolderDefaults) Seek(offset int64, whence int) (int64, error)

func (*ForensicFolderDefaults) Size

func (*ForensicFolderDefaults) Size() int64

type ForensicItem

type ForensicItem interface {
	Name() string
	Read([]byte) (int, error)
	ReadAt([]byte, int64) (int, error)
	Seek(int64, int) (int64, error)
	Size() int64
	Readdirnames(int) ([]string, error)
	IsDir() bool
	Attributes() map[string]interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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