feat(qs2) add qs2 framework

This commit is contained in:
hexxa 2020-12-05 10:30:03 +08:00
parent 6ae65fe09b
commit 83100007e3
33 changed files with 2934 additions and 60 deletions

28
src/fs/fs_interface.go Normal file
View file

@ -0,0 +1,28 @@
package fs
import (
"io"
"os"
)
type ReadCloseSeeker interface {
io.Reader
io.ReaderFrom
io.Closer
io.Seeker
}
type ISimpleFS interface {
Create(path string) error
MkdirAll(path string) error
Remove(path string) error
Rename(oldpath, newpath string) error
ReadAt(path string, b []byte, off int64) (n int, err error)
WriteAt(path string, b []byte, off int64) (n int, err error)
Stat(path string) (os.FileInfo, error)
Close() error
Sync() error
GetFileReader(path string) (ReadCloseSeeker, error)
Root() string
ListDir(path string) ([]os.FileInfo, error)
}