Use fsnotify

This commit is contained in:
Yasuhiro Matsumoto
2022-05-07 00:57:52 +09:00
committed by Ben Johnson
parent 98673c6785
commit 2c0dce21fa
8 changed files with 26 additions and 896 deletions

View File

@@ -176,15 +176,6 @@ func MkdirAll(path string, mode os.FileMode, uid, gid int) error {
return nil
}
// Fileinfo returns syscall fields from a FileInfo object.
func Fileinfo(fi os.FileInfo) (uid, gid int) {
if fi == nil {
return -1, -1
}
stat := fi.Sys().(*syscall.Stat_t)
return int(stat.Uid), int(stat.Gid)
}
// ParseSnapshotPath parses the index from a snapshot filename. Used by path-based replicas.
func ParseSnapshotPath(s string) (index int, err error) {
a := snapshotPathRegex.FindStringSubmatch(s)