mirror of https://github.com/databricks/cli.git
21 lines
275 B
Go
21 lines
275 B
Go
|
package fileset
|
||
|
|
||
|
import (
|
||
|
"io/fs"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type File struct {
|
||
|
fs.DirEntry
|
||
|
Absolute, Relative string
|
||
|
}
|
||
|
|
||
|
func (f File) Modified() (ts time.Time) {
|
||
|
info, err := f.Info()
|
||
|
if err != nil {
|
||
|
// return default time, beginning of epoch
|
||
|
return ts
|
||
|
}
|
||
|
return info.ModTime()
|
||
|
}
|