initial commits

master
Charles Iliya Krempeaux 2022-12-14 03:33:55 -08:00
parent f24d4e7cca
commit 6f2d80962f
1 changed files with 39 additions and 0 deletions

39
fileinfo.go 100644
View File

@ -0,0 +1,39 @@
package strfs
import (
"io/fs"
"time"
)
type internalFileInfo struct {
mode fs.FileMode
modtime time.Time
name string
size int64
}
var _ fs.FileInfo = &internalFileInfo{}
func (receiver internalFileInfo) IsDir() bool {
return 0 != (receiver.mode & fs.ModeDir)
}
func (receiver internalFileInfo) Mode() fs.FileMode {
return receiver.mode
}
func (receiver internalFileInfo) ModTime() time.Time {
return receiver.modtime
}
func (receiver internalFileInfo) Name() string {
return receiver.name
}
func (receiver internalFileInfo) Size() int64 {
return receiver.size
}
func (receiver internalFileInfo) Sys() any {
return nil
}