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

Function registerStdFile

io.go:300–307  ·  view source on GitHub ↗
(l *State, f *os.File, reg, name string)

Source from the content-addressed store, hash-verified

298}
299
300func registerStdFile(l *State, f *os.File, reg, name string) {
301 newStream(l, f, dontClose)
302 if reg != "" {
303 l.PushValue(-1)
304 l.SetField(RegistryIndex, reg)
305 }
306 l.SetField(-2, name)
307}
308
309// IOOpen opens the io library. Usually passed to Require.
310func IOOpen(l *State) int {

Callers 1

IOOpenFunction · 0.85

Calls 3

newStreamFunction · 0.85
PushValueMethod · 0.80
SetFieldMethod · 0.80

Tested by

no test coverage detected