(L *LState)
| 212 | } |
| 213 | |
| 214 | func 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 | |
| 232 | func fileWriteAux(L *LState, file *lFile, idx int) int { |
| 233 | if n := fileIsWritable(L, file); n != 0 { |