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

Function newStream

io.go:30–35  ·  view source on GitHub ↗
(l *State, f *os.File, close Function)

Source from the content-addressed store, hash-verified

28}
29
30func newStream(l *State, f *os.File, close Function) *stream {
31 s := &stream{f: f, close: close}
32 l.PushUserData(s)
33 SetMetaTableNamed(l, fileHandle)
34 return s
35}
36
37func newFile(l *State) *stream {
38 return newStream(l, nil, func(l *State) int { return FileResult(l, toStream(l).f.Close(), "") })

Callers 2

newFileFunction · 0.85
registerStdFileFunction · 0.85

Calls 2

SetMetaTableNamedFunction · 0.85
PushUserDataMethod · 0.80

Tested by

no test coverage detected