github.com/code-to-go/safepool.lib@v0.0.0-20221205180519-ee25e63c226e/transport/simplefileinfo.go (about) 1 package transport 2 3 import ( 4 "io/fs" 5 "time" 6 ) 7 8 type simpleFileInfo struct { 9 name string 10 size int64 11 isDir bool 12 modTime time.Time 13 } 14 15 func (f simpleFileInfo) Name() string { 16 return f.name 17 } 18 19 func (f simpleFileInfo) Size() int64 { 20 return f.size 21 } 22 23 func (f simpleFileInfo) Mode() fs.FileMode { 24 return 0644 25 } 26 27 func (f simpleFileInfo) ModTime() time.Time { 28 return f.modTime 29 } 30 31 func (f simpleFileInfo) IsDir() bool { 32 return f.isDir 33 } 34 35 func (f simpleFileInfo) Sys() interface{} { 36 return nil 37 }