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

Function toFile

io.go:21–28  ·  view source on GitHub ↗
(l *State)

Source from the content-addressed store, hash-verified

19func toStream(l *State) *stream { return CheckUserData(l, 1, fileHandle).(*stream) }
20
21func toFile(l *State) *os.File {
22 s := toStream(l)
23 if s.close == nil {
24 Errorf(l, "attempt to use a closed file")
25 }
26 l.assert(s.f != nil)
27 return s.f
28}
29
30func newStream(l *State, f *os.File, close Function) *stream {
31 s := &stream{f: f, close: close}

Callers 3

ioFileHelperFunction · 0.85
closeFunction · 0.85
io.goFile · 0.85

Calls 3

toStreamFunction · 0.85
ErrorfFunction · 0.85
assertMethod · 0.45

Tested by

no test coverage detected