cachefs/pkg/fs/dir.go

32 lines
458 B
Go

// Copyright (C) 2022 Marius Schellenberger
package fs
import (
"io"
"os"
)
type Dir struct {
f *os.File
}
func (f *Dir) Read(_ []byte) (int, error) {
return 0, io.EOF
}
func (f *Dir) Seek(_ int64, _ int) (int64, error) {
return 0, io.EOF
}
func (f *Dir) Readdir(count int) ([]os.FileInfo, error) {
return f.f.Readdir(count)
}
func (f *Dir) Stat() (os.FileInfo, error) {
return f.f.Stat()
}
func (f *Dir) Close() error {
return f.f.Close()
}