mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 02:57:52 +08:00
23 lines
289 B
Go
23 lines
289 B
Go
package eval
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/elves/elvish/parse"
|
|
)
|
|
|
|
type File struct {
|
|
inner *os.File
|
|
}
|
|
|
|
var _ Value = File{}
|
|
|
|
func (File) Kind() string {
|
|
return "file"
|
|
}
|
|
|
|
func (f File) Repr(int) string {
|
|
return fmt.Sprintf("<file{%s %p}>", parse.Quote(f.inner.Name()), f.inner)
|
|
}
|