1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- package filesystem
- import (
- "os"
- "path/filepath"
- "time"
- )
- type Filesystem interface {
-
- Stat(name string) (os.FileInfo, error)
- Create(name string) (File, error)
- Rename(oldpath, newpath string) error
- MkdirAll(path string, perm os.FileMode) error
- Chtimes(name string, atime time.Time, mtime time.Time) error
- RemoveAll(path string) error
- Remove(name string) error
-
- ReadFile(filename string) ([]byte, error)
- TempDir(dir, prefix string) (string, error)
- TempFile(dir, prefix string) (File, error)
- ReadDir(dirname string) ([]os.FileInfo, error)
- Walk(root string, walkFn filepath.WalkFunc) error
- }
- type File interface {
-
- Name() string
- Write(b []byte) (n int, err error)
- Sync() error
- Close() error
- }
|