MCPcopy Create free account
hub / github.com/yuin/gopher-lua / fileIsWritable

Function fileIsWritable

iolib.go:149–157  ·  view source on GitHub ↗
(L *LState, file *lFile)

Source from the content-addressed store, hash-verified

147}
148
149func fileIsWritable(L *LState, file *lFile) int {
150 if file.writer == nil {
151 L.Push(LNil)
152 L.Push(LString(fmt.Sprintf("%s is opened for only reading.", file.Name())))
153 L.Push(LNumber(1)) // C-Lua compatibility: Original Lua pushes errno to the stack
154 return 3
155 }
156 return 0
157}
158
159func fileIsReadable(L *LState, file *lFile) int {
160 if file.reader == nil {

Callers 3

fileWriteAuxFunction · 0.85
fileFlushAuxFunction · 0.85
fileSetVBufFunction · 0.85

Calls 4

LStringTypeAlias · 0.85
LNumberTypeAlias · 0.85
NameMethod · 0.80
PushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…