42 lines
500 B
Go
42 lines
500 B
Go
package mock
|
|
|
|
import (
|
|
"os"
|
|
"time"
|
|
|
|
"go.jolheiser.com/cabinet/internal/workspace"
|
|
)
|
|
|
|
type File struct {
|
|
name string
|
|
Content string
|
|
size int64
|
|
modTime time.Time
|
|
|
|
Meta workspace.Meta
|
|
}
|
|
|
|
func (f *File) Name() string {
|
|
return f.name
|
|
}
|
|
|
|
func (f *File) Size() int64 {
|
|
return f.size
|
|
}
|
|
|
|
func (f *File) ModTime() time.Time {
|
|
return f.modTime
|
|
}
|
|
|
|
func (f *File) Mode() os.FileMode {
|
|
return os.ModePerm
|
|
}
|
|
|
|
func (f *File) IsDir() bool {
|
|
return false
|
|
}
|
|
|
|
func (f *File) Sys() any {
|
|
return nil
|
|
}
|