Documentation ¶
Index ¶
- Variables
- func Checksum(content string) (string, error)
- func Chmod(file string, perm fs.FileMode) error
- func Chown(file string, user int, group int) error
- func Copy(origin string, destination string) error
- func Delete(file string) error
- func Dir(path string) string
- func EnsureDirectory(file string) error
- func Exec(cmd string, args ...string) (string, error)
- func Exist(path string) bool
- func Extension(file string) string
- func File(path string) string
- func Find(root string, names []string) ([]string, error)
- func FindMatch(root string, patterns []string) ([]string, error)
- func Info(file string) (string, string, fs.FileMode)
- func List(root string) ([]string, error)
- func Move(origin string, destination string) error
- func Name(path string) string
- func NodeRequire(command string, pkg string) error
- func Permissions(path string) (fs.FileMode, error)
- func Printf(color string, format string, args ...interface{})
- func Read(file string) (string, error)
- func ReadMany(files []string) (string, error)
- func Rename(origin string, destination string) error
- func Walk(root string, callback WalkCallback) error
- func Watch(path string, interval time.Duration, onChange WatchCallback, ...)
- func Write(file string, content string, perm fs.FileMode) error
- type WalkCallback
- type WatchCallback
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Purple = "\033[35m" Cyan = "\033[36m" Gray = "\033[37m" White = "\033[97m" Notice = Cyan Warn = Yellow Fatal = Red Success = Green )
Colors
Functions ¶
func EnsureDirectory ¶
EnsureDirectory makes sure directory exists from file path
func NodeRequire ¶ added in v0.0.5
Check if node package command exists, otherwise, try to install the package
func Permissions ¶
Permissions retrieve permissions for file or directory
func Walk ¶
func Walk(root string, callback WalkCallback) error
Walk find files in path and process callback for every result
func Watch ¶
func Watch(path string, interval time.Duration, onChange WatchCallback, onDelete WatchCallback)
Watch check for changes on path files and trigger events on change or on delete file
Types ¶
Click to show internal directories.
Click to hide internal directories.