(L *LState, file *lFile)
| 147 | } |
| 148 | |
| 149 | func 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 | |
| 159 | func fileIsReadable(L *LState, file *lFile) int { |
| 160 | if file.reader == nil { |
no test coverage detected
searching dependent graphs…