add modTime & refresh if file changed
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func getParquetColumns(s Server, path string) []string {
|
||||
@@ -82,6 +83,14 @@ func getFileSize(path string) uint64 {
|
||||
return uint64(info.Size() / (1024 * 1024)) // MB
|
||||
}
|
||||
|
||||
func getModTime(path string) time.Time {
|
||||
info, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return time.Time{}
|
||||
}
|
||||
return info.ModTime()
|
||||
}
|
||||
|
||||
func FormatParquetName(path string) string {
|
||||
_, file := filepath.Split(path)
|
||||
fileName := strings.TrimSuffix(file, ".parquet")
|
||||
|
||||
Reference in New Issue
Block a user