go-judge/file/interface.go
2019-09-01 20:40:34 -07:00

12 lines
260 B
Go

package file
import "os"
// File defines file name with its content
// file could on file system or memory
type File interface {
Name() string
Content() ([]byte, error) // get content of the file
Open() (*os.File, error) // get readonly fd of the file
}