IsOk (File)

From OxeyeWiki

Revision as of 18:43, 7 February 2010 by Jeb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox