feat(qs2) add qs2 framework
This commit is contained in:
parent
6ae65fe09b
commit
83100007e3
33 changed files with 2934 additions and 60 deletions
28
src/fs/fs_interface.go
Normal file
28
src/fs/fs_interface.go
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue