added preload status and cancel
This commit is contained in:
parent
0c9fb06263
commit
a069baf48d
10 changed files with 153 additions and 35 deletions
32
pkg/fs/dir.go
Normal file
32
pkg/fs/dir.go
Normal 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()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue