added preload status and cancel

This commit is contained in:
ston1th 2022-03-16 01:58:10 +01:00
commit a069baf48d
10 changed files with 153 additions and 35 deletions

32
pkg/fs/dir.go Normal file
View file

@ -0,0 +1,32 @@
// 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()
}