files

package
v0.0.0-...-0871eb3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileList

func GetFileList(basePath string, extensions []string) []string

GetFileList is to get file list using multiple goroutine

func GetFileListJIC

func GetFileListJIC(basePath string, extensions []string) []string

GetFileListJIC is to get file list without goroutine It doesn't use channel. But faster. (JIC means Just In Case)

func GetFileListSingle

func GetFileListSingle(basePath string, extensions []string) []string

GetFileListSingle is to get file list using a goroutine

func WatchFile

func WatchFile(fileList []string) error

WatchFile is to watch file modified or not

Types

type FileLock

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

FileLock is FileLock object

func NewFileLock

func NewFileLock(fileName string) (*FileLock, error)

NewFileLock is to open file with filelock

func (*FileLock) Lock

func (m *FileLock) Lock() error

Lock is to lock file

func (*FileLock) Unlock

func (m *FileLock) Unlock() error

Unlock is to unlock file

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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