committed by
Jakob Borg
parent
00008994e4
commit
b2e7ecdbf0
+8
-4
@@ -130,7 +130,7 @@ func (f *MtimeFS) Create(name string) (File, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &mtimeFile{fd, f}, nil
|
||||
return mtimeFile{fd, f}, nil
|
||||
}
|
||||
|
||||
func (f *MtimeFS) Open(name string) (File, error) {
|
||||
@@ -138,7 +138,7 @@ func (f *MtimeFS) Open(name string) (File, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &mtimeFile{fd, f}, nil
|
||||
return mtimeFile{fd, f}, nil
|
||||
}
|
||||
|
||||
func (f *MtimeFS) OpenFile(name string, flags int, mode FileMode) (File, error) {
|
||||
@@ -146,7 +146,7 @@ func (f *MtimeFS) OpenFile(name string, flags int, mode FileMode) (File, error)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &mtimeFile{fd, f}, nil
|
||||
return mtimeFile{fd, f}, nil
|
||||
}
|
||||
|
||||
// "real" is the on disk timestamp
|
||||
@@ -208,7 +208,7 @@ type mtimeFile struct {
|
||||
fs *MtimeFS
|
||||
}
|
||||
|
||||
func (f *mtimeFile) Stat() (FileInfo, error) {
|
||||
func (f mtimeFile) Stat() (FileInfo, error) {
|
||||
info, err := f.File.Stat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -228,6 +228,10 @@ func (f *mtimeFile) Stat() (FileInfo, error) {
|
||||
return info, nil
|
||||
}
|
||||
|
||||
func (f mtimeFile) unwrap() File {
|
||||
return f.File
|
||||
}
|
||||
|
||||
// The dbMtime is our database representation
|
||||
|
||||
type dbMtime struct {
|
||||
|
||||
Reference in New Issue
Block a user