gitee.com/jokerscaer/packr@v1.11.1/file_info.go (about) 1 package packr 2 3 import ( 4 "os" 5 "time" 6 ) 7 8 type fileInfo struct { 9 Path string 10 Contents []byte 11 size int64 12 modTime time.Time 13 isDir bool 14 } 15 16 func (f fileInfo) Name() string { 17 return f.Path 18 } 19 20 func (f fileInfo) Size() int64 { 21 return f.size 22 } 23 24 func (f fileInfo) Mode() os.FileMode { 25 return 0444 26 } 27 28 func (f fileInfo) ModTime() time.Time { 29 return f.modTime 30 } 31 32 func (f fileInfo) IsDir() bool { 33 return f.isDir 34 } 35 36 func (f fileInfo) Sys() interface{} { 37 return nil 38 }