filekit

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDir

func FindDir(includes, excludes []string) (packages []string, err error)

FindDir find directory

func MatchMulti

func MatchMulti(patterns []string, name string) bool

MatchMulti similar with filepath.Match except accept multiple pattern

Types

type FileInfo

type FileInfo struct {
	NameField    string
	SizeField    int64
	ModeField    os.FileMode
	ModTimeField time.Time
	IsDirField   bool
	SysField     interface{}
}

FileInfo os.FileInfo implementation

func (*FileInfo) IsDir

func (f *FileInfo) IsDir() bool

IsDir is abbreviation for Mode().IsDir()

func (*FileInfo) ModTime

func (f *FileInfo) ModTime() time.Time

ModTime is modification time

func (*FileInfo) Mode

func (f *FileInfo) Mode() os.FileMode

Mode is file mode bits

func (*FileInfo) Name

func (f *FileInfo) Name() string

Name is base name of the file

func (*FileInfo) Size

func (f *FileInfo) Size() int64

Size is length in bytes for regular files; system-dependent for others

func (*FileInfo) Sys

func (f *FileInfo) Sys() interface{}

Sys is underlying data source (can return nil)

Jump to

Keyboard shortcuts

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