MCPcopy Index your code
hub / github.com/Shopify/go-lua / ioFile

Function ioFile

io.go:41–48  ·  view source on GitHub ↗
(l *State, name string)

Source from the content-addressed store, hash-verified

39}
40
41func ioFile(l *State, name string) *os.File {
42 l.Field(RegistryIndex, name)
43 s := l.ToUserData(-1).(*stream)
44 if s.close == nil {
45 Errorf(l, fmt.Sprintf("standard %s file is closed", name[len("_IO_"):]))
46 }
47 return s.f
48}
49
50func forceOpen(l *State, name, mode string) {
51 s := newFile(l)

Callers 1

io.goFile · 0.85

Calls 3

ErrorfFunction · 0.85
FieldMethod · 0.80
ToUserDataMethod · 0.80

Tested by

no test coverage detected