fileindex

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

README

Reminders for later

Check if files are on same filesystem: https://groups.google.com/forum/#!msg/Golang-Nuts/_PFAK438FMg/L92NlyO50ucJ

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HiddenFilter = PrefixFilter(".")
View Source
var NoFilter = func(fi os.FileInfo) bool {
	return false
}

Functions

This section is empty.

Types

type Entry

type Entry interface {
	Id() string
	Name() string
	IsDir() bool
	Path() string
	ParentId() string
}

type Filter

type Filter func(fi os.FileInfo) bool

func AndFilter

func AndFilter(filters ...Filter) Filter

func OrFilter

func OrFilter(filters ...Filter) Filter

func PrefixFilter

func PrefixFilter(prefixes ...string) Filter

func SuffixFilter

func SuffixFilter(suffixes ...string) Filter

type Index

type Index interface {
	Id() string
	Root() string
	Get(id string) (Entry, error)
	WaitForReady() error
	List(parent string) ([]Entry, error)
}

func NewMemIndex

func NewMemIndex(root string, id string, filter Filter) (Index, error)

Jump to

Keyboard shortcuts

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