package
0.0.0-20201109034415-91f046a3fb75
Repository: https://github.com/fengwutech/commons.git
Documentation: pkg.go.dev
# Functions
Exists 判断文件或目录是否存在.
FileGetContents 从文件读取内容.
FilePutContents 往文件写入内容.
FilesWithSuffixInDir 查找文件夹中符合后缀要求的文件名 NOTICE: 如果用类似的后缀,如 conf config, 函数不去重.
NewWatcher 创建一个新的watcher对象 rootDir为待watch的根目录.
# Constants
FileAppend just alias.
WatcherEventChange 文件内容、名称、属性等变化.
WatcherEventCreate 新创建文件.
WatcherEventDelete 文件被删除,包括名字修改,路径调整如 文件名 由 a 调整 为b,会产生2个event,分别为:a-删除,b-创建.