fs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDir

func IsDir(path string) (bool, error)

IsDir returns true if the path is a directory

func IsGeneratedFile

func IsGeneratedFile(fileName string) bool

IsGeneratedFile checks if the file is a generated file It must be a .go file It must start with the prefix and end with the suffix

func IsGoFile

func IsGoFile(fileName string) bool

IsGoFile checks if the file is a .go file

func IsProjectFile

func IsProjectFile(fileName string) bool

IsProjectFile checks if the file is a project file (not a generated file, neither a test file)

func ListFiles

func ListFiles(dir string, recursive bool, filter func(string) bool) ([]string, error)

ListFiles lists files in a directory The file name must be checked through the filter function If recursive is true, the files are listed in all subdirectories

func WorkDir

func WorkDir(root ...string) (string, error)

WorkDir returns the working directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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