|
@@ -5,7 +5,10 @@ import (
|
|
|
"fmt"
|
|
|
"github.com/patrickmn/go-cache"
|
|
|
"io/fs"
|
|
|
+ "os"
|
|
|
"path/filepath"
|
|
|
+ "strings"
|
|
|
+ "syscall"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -26,7 +29,7 @@ func mtjhWatch() {
|
|
|
return err
|
|
|
}
|
|
|
if !info.IsDir() {
|
|
|
- /*fileInfo, err := os.Stat(path)
|
|
|
+ fileInfo, err := os.Stat(path)
|
|
|
if err != nil {
|
|
|
fmt.Println("os.Stat:", err.Error())
|
|
|
}
|
|
@@ -47,7 +50,7 @@ func mtjhWatch() {
|
|
|
}
|
|
|
}
|
|
|
cacheClient.Delete(path)
|
|
|
- cacheClient.Set(path, modifyTimeStr, 24*time.Hour)*/
|
|
|
+ cacheClient.Set(path, modifyTimeStr, 24*time.Hour)
|
|
|
}
|
|
|
return nil
|
|
|
})
|