IsOk (File)
From OxeyeWiki
file:isOk() | ||
Checks if a ReadFile is in "ok" status. | ||
Parameter | Expected Type | Description |
No parameters | ||
Returns | ||
Returns true if the file has been opened and can be read from. |
DaisyMoon File Objects |
---|
Example
local file = ReadFile("myfile.dat", "f") if file:isOk() then -- read bunch of stuff file:close() end -- you don't need to close files that aren't ok