goff

package module
v0.0.0-...-2c66df9 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

goff is a little package to create test directory tree

This code is probably embarassing. I am maintaining it only for myself. The only reason I am making this public is the cumbersome way golang manages privately-repo'ed packages.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDir

func IsDir(path string, statInfo os.FileInfo) bool

func IsRegular

func IsRegular(path string, statInfo os.FileInfo) bool
func IsSymLink(path string, statInfo os.FileInfo) bool

Types

type FSOList

type FSOList []FSObject

FSOLists are to attach filters to the results of walk

func Walk

func Walk(root string, quickabort bool) FSOList

func (FSOList) KeepOnly

func (fl FSOList) KeepOnly(ff FilterFunc) FSOList

func (FSOList) Remove

func (fl FSOList) Remove(ff FilterFunc) FSOList

type FSObject

type FSObject struct {
	Path     string // path to the object
	StatInfo os.FileInfo
}

FSObjects are basically caching the walk results

type FilterFunc

type FilterFunc func(path string, StatInfo os.FileInfo) bool

Jump to

Keyboard shortcuts

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