61 lines
997 B
Go
61 lines
997 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
var (
|
|
ErrNotSupported = errors.New("land: not supported")
|
|
)
|
|
|
|
type stdFD struct {
|
|
io.ReadWriteCloser
|
|
name string
|
|
}
|
|
|
|
func (s stdFD) Close() error {
|
|
return nil
|
|
}
|
|
|
|
func (s stdFD) Name() string {
|
|
return s.name
|
|
}
|
|
|
|
func (s stdFD) ReadAt(p []byte, off int64) (int, error) {
|
|
return 0, ErrNotSupported
|
|
}
|
|
|
|
func (s stdFD) WriteAt(p []byte, off int64) (int, error) {
|
|
return 0, ErrNotSupported
|
|
}
|
|
|
|
func (s stdFD) Seek(offset int64, whence int) (int64, error) {
|
|
return 0, ErrNotSupported
|
|
}
|
|
|
|
func (s stdFD) Readdir(count int) ([]os.FileInfo, error) {
|
|
return nil, ErrNotSupported
|
|
}
|
|
|
|
func (s stdFD) Readdirnames(n int) ([]string, error) {
|
|
return nil, ErrNotSupported
|
|
}
|
|
|
|
func (s stdFD) Stat() (os.FileInfo, error) {
|
|
return nil, ErrNotSupported
|
|
}
|
|
|
|
func (s stdFD) Sync() error {
|
|
return ErrNotSupported
|
|
}
|
|
|
|
func (s stdFD) Truncate(size int64) error {
|
|
return ErrNotSupported
|
|
}
|
|
|
|
func (s stdFD) WriteString(st string) (int, error) {
|
|
return s.Write([]byte(st))
|
|
}
|