MCPcopy Index your code
hub / github.com/yuin/gopher-lua / checkFile

Function checkFile

iolib.go:50–57  ·  view source on GitHub ↗
(L *LState)

Source from the content-addressed store, hash-verified

48const fileDefaultReadBuffer = 4096
49
50func checkFile(L *LState) *lFile {
51 ud := L.CheckUserData(1)
52 if file, ok := ud.Value.(*lFile); ok {
53 return file
54 }
55 L.ArgError(1, "file expected")
56 return nil
57}
58
59func errorIfFileIsClosed(L *LState, file *lFile) {
60 if file.closed {

Callers 8

fileToStringFunction · 0.85
fileSeekFunction · 0.85
fileWriteFunction · 0.85
fileCloseFunction · 0.85
fileFlushFunction · 0.85
fileLinesFunction · 0.85
fileReadFunction · 0.85
fileSetVBufFunction · 0.85

Calls 2

CheckUserDataMethod · 0.80
ArgErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…