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

Function fileToString

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

Source from the content-addressed store, hash-verified

212}
213
214func fileToString(L *LState) int {
215 file := checkFile(L)
216 if file.Type() == lFileFile {
217 if file.closed {
218 L.Push(LString("file (closed)"))
219 } else {
220 L.Push(LString("file"))
221 }
222 } else {
223 if file.closed {
224 L.Push(LString("process (closed)"))
225 } else {
226 L.Push(LString("process"))
227 }
228 }
229 return 1
230}
231
232func fileWriteAux(L *LState, file *lFile, idx int) int {
233 if n := fileIsWritable(L, file); n != 0 {

Callers

nothing calls this directly

Calls 4

checkFileFunction · 0.85
LStringTypeAlias · 0.85
TypeMethod · 0.65
PushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…